code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE Arrows, FlexibleContexts, FlexibleInstances,
MultiParamTypeClasses #-}
module Karamaan.Opaleye.LeftJoin where
import Data.Profunctor.Product.Default (Default, def)
import Karamaan.Opaleye.QueryColspec (QueryColspec)
import Karamaan.Opaleye.QueryArr (Query)
import Karamaan.Opaleye.Wire (Wire)... | dbp/karamaan-opaleye | Karamaan/Opaleye/LeftJoin.hs | bsd-3-clause | 2,730 | 2 | 15 | 607 | 725 | 398 | 327 | 43 | 1 |
{-# LANGUAGE
CPP
, DeriveDataTypeable
, FlexibleContexts
, FlexibleInstances
, MultiParamTypeClasses #-}
{- |
Copyright : (c) Andy Sonnenburg 2013
License : BSD3
Maintainer : andy22286@gmail.com
-}
module Data.Var.IO
( module Data.Var.Class
, IOVar
, IOUVar
) where
#if... | sonyandy/var | src/Data/Var/IO.hs | bsd-3-clause | 894 | 0 | 7 | 186 | 146 | 89 | 57 | 23 | 0 |
{-|
Form functions that report errors about each form field.
Most code are copied and modified from yesod-form.
-}
module Yesod.Helpers.Form2
( FieldErrors, oneFieldError, overallFieldError, nullFieldErrors, fieldErrorsToList
, EMForm, SEMForm
, runEMFormPost
, runEMFormPostNoToken
, runEMFormGet
... | yoo-e/yesod-helpers | Yesod/Helpers/Form2.hs | bsd-3-clause | 22,231 | 0 | 23 | 7,282 | 5,790 | 2,974 | 2,816 | -1 | -1 |
{-# LANGUAGE TemplateHaskell, RankNTypes, ScopedTypeVariables #-}
module LineCounter (countLines) where
import Control.Exception (catch)
import Control.Monad (forever)
import Control.Monad.Trans.State.Strict (StateT)
import Control.Lens ((^.), (.=), (%=), makeLenses, use)
import Data.Char (isSpace)
import Pipes
impor... | mitchellwrosen/Sloch | src/sloch/LineCounter.hs | bsd-3-clause | 2,044 | 0 | 16 | 560 | 532 | 292 | 240 | 47 | 1 |
-- | Helpers for setting up a tls connection with @tls@ package,
-- for further customization, please refer to @tls@ package.
--
-- Note, functions in this module will throw error if can't load certificates or CA store.
--
module Data.TLSSetting
( -- * Choose a CAStore
TrustedCAStore(..)
-- * Make TLS s... | didi-FP/tcp-streams | Data/TLSSetting.hs | bsd-3-clause | 6,056 | 0 | 16 | 1,872 | 838 | 469 | 369 | 82 | 2 |
-- Copyright 2013 Kevin Backhouse.
module TestMonoid2 ( instanceTest ) where
import Control.Monad.ST2
import Control.Monad.MultiPass
import Control.Monad.MultiPass.Instrument.Monoid2
import Control.Monad.MultiPass.Utils.InstanceTest
import Data.Monoid
-- This test checks that all the necessary instances have been
--... | kevinbackhouse/Control-Monad-MultiPass | tests/TestMonoid2.hs | bsd-3-clause | 838 | 0 | 7 | 124 | 169 | 95 | 74 | 18 | 1 |
{-# LANGUAGE CPP #-}
module TcSimplify(
simplifyInfer, InferMode(..),
growThetaTyVars,
simplifyAmbiguityCheck,
simplifyDefault,
simplifyTop, simplifyTopImplic,
simplifyInteractive,
solveEqualities, solveLocalEqualities, solveLocalEqualitiesX,
simplifyWantedsTcM,
... | sdiehl/ghc | compiler/typecheck/TcSimplify.hs | bsd-3-clause | 119,249 | 6 | 19 | 32,759 | 12,025 | 6,284 | 5,741 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Utils where
import Data.Char
import Data.Set
nubOrd :: forall a . Ord a => [a] -> [a]
nubOrd = inner empty
where
inner :: Set a -> [a] -> [a]
inner acc (a : r)
| a `member` acc = inner acc r
| otherwise ... | soenkehahn/dead-code-detection | src/Utils.hs | bsd-3-clause | 963 | 0 | 13 | 241 | 304 | 155 | 149 | 29 | 2 |
module CmmMachOp
( MachOp(..)
, pprMachOp, isCommutableMachOp, isAssociativeMachOp
, isComparisonMachOp, machOpResultType
, machOpArgReps, maybeInvertComparison
-- MachOp builders
, mo_wordAdd, mo_wordSub, mo_wordEq, mo_wordNe,mo_wordMul, mo_wordSQuot
, mo_wordSRem, mo_wordSNeg, mo_wordUQu... | ekmett/ghc | compiler/cmm/CmmMachOp.hs | bsd-3-clause | 18,306 | 0 | 13 | 5,199 | 4,317 | 2,282 | 2,035 | 371 | 60 |
{-# LANGUAGE GADTs, Arrows #-}
module Grammar
-- ( grammar, NT (Decls) )
where
import qualified Data.Text as T
import Control.Applicative
import Data.Type.Equality
import Data.Type.Eq
import Data.Type.Show
import Language.Forvie.Parsing.Grammar
import qualified Token as T
import Display
------------------... | bobatkey/Forvie | benchmarks/parse-foveran/Grammar.hs | bsd-3-clause | 12,399 | 0 | 37 | 4,848 | 3,632 | 1,849 | 1,783 | 136 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.CommSec.KeyExchange
-- import Network.CommSec
import qualified Data.ByteString as B
import Data.ByteString.Char8 ()
import Crypto.PubKey.OpenSsh
import Crypto.Types.PubKey.RSA
import Control.Concurrent
import System.FilePath
port :: PortNumber
port ... | TomMD/commsec-keyexchange | Test/test.hs | bsd-3-clause | 1,175 | 0 | 13 | 248 | 377 | 194 | 183 | 33 | 1 |
-- | Calculates the new simulation step taking into account changes made to the
-- MultiCoreStatus that reflect user input.
module Controller.Helpers.NextSimState where
-- External imports
import Control.Monad
import Hails.MVC.Model.ProtectedModel.Reactive
import SoOSiM (tick)
import SoOSiM.Types (SimState)
-- Intern... | ivanperez-keera/SoOSiM-ui | src/Controller/Helpers/NextSimState.hs | bsd-3-clause | 2,382 | 0 | 13 | 469 | 624 | 331 | 293 | 41 | 4 |
module Language.Css.Decl where
import Language.Css.Selectors
import Language.Css.Properties
data CssRule = CssRule
{ rule :: CssProperty
, isImportant :: Bool
} deriving (Show, Eq)
data CssDecl = CssDecl
{ declSelector :: CssCombinator
, declRules :: [CssRule]
} deriving (Show, Eq)
| athanclark/css-grammar | src/Language/Css/Decl.hs | bsd-3-clause | 302 | 0 | 9 | 58 | 86 | 53 | 33 | 11 | 0 |
{--import qualified Data.Map as Map
import Control.Monad.State (runState)
import System (getArgs)
import Text.XML.HaXml
import Text.XML.HaXml.Pretty
import GenNew
import GenXml
import ParseXml
main :: IO ()
main = do --interact (render . document . genXml . fst . (\f -> runState (genNewIds f) (0,Map.empty)) . parseX... | molysgaard/OsmXmlTool | OsmXmlTool.hs | bsd-3-clause | 1,831 | 0 | 16 | 429 | 375 | 202 | 173 | 31 | 2 |
{-# LANGUAGE ForeignFunctionInterface #-}
module OIS.OISPrereqs(
component_with_void,
component_with,
button_with_void,
button_with,
axis_with,
vector3_with_void,
vector3_with,
component_delete,
button_delete,
axis_delete,
vector3_delete,
component_new_void,
component_new,
button_new_void,
button_new,
ax... | ghorn/hois | OIS/OISPrereqs.hs | bsd-3-clause | 3,829 | 0 | 11 | 702 | 1,118 | 552 | 566 | 108 | 1 |
module Language.GroteTrap.Show (lshow, format) where
import Data.Maybe
import Data.List
import Data.Generics hiding (Prefix)
import Language.GroteTrap.Language
import Language.GroteTrap.Parser
lshow lang = lshow' lang maxBound
lshow' :: Data a => Language a -> Int -> a -> String
lshow' lang contextPrio val =
if is... | MedeaMelana/GroteTrap | Language/GroteTrap/Show.hs | bsd-3-clause | 1,775 | 0 | 14 | 431 | 746 | 380 | 366 | 39 | 5 |
{-# LANGUAGE TemplateHaskell, TupleSections #-}
module Ask (askTestGroup) where
import Test.Tasty
import Test.Tasty.HUnit
import Utility
import Language.Logo
import Control.Monad.Trans.Class (lift)
import Control.Monad (liftM4)
import Prelude hiding (show)
globals ["glob1"]
turtles_own ["tvar"]
breeds ["frogs", "f... | bezirg/hlogo | tests/Ask.hs | bsd-3-clause | 6,734 | 0 | 20 | 2,563 | 1,752 | 837 | 915 | 140 | 1 |
module Main where
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
import Frame
import Init
import MonadFrame
import MonadVulkan
import Render
import SDL ( showWindow
... | expipiplus1/vulkan | examples/rays/Main.hs | bsd-3-clause | 1,530 | 0 | 23 | 673 | 375 | 184 | 191 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
module Data.Object.Parse where
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HM
import Data.Hashable
-- import Control.Comonad.... | esmolanka/struct-parse | Data/Object/Parse.hs | bsd-3-clause | 2,146 | 0 | 11 | 451 | 714 | 369 | 345 | 68 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Sonos.XML where
import Text.XML
import Text.XML.Cursor
import Sonos.Types
import Data.Maybe ( fromJust)
import Data.String ( fromString
, IsString
... | merc1031/haskell-sonos-http-api | src/Sonos/XML.hs | bsd-3-clause | 4,664 | 0 | 16 | 1,979 | 1,112 | 589 | 523 | 100 | 4 |
module Graphics.DrawingCombinators.Utils (
Image, square,
textHeight, textSize,
textLinesWidth, textLinesHeight, textLinesSize,
drawText, drawTextLines, backgroundColor) where
import Control.Monad(void)
import Data.List(genericLength)
import Data.Monoid(Monoid(..))
import Data.Vector.Vector2(Vector2(..))
impor... | sinelaw/lamdu | bottlelib/Graphics/DrawingCombinators/Utils.hs | gpl-3.0 | 1,740 | 0 | 11 | 289 | 577 | 319 | 258 | 39 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/AttachNetworkInterface.hs | mpl-2.0 | 5,602 | 0 | 13 | 1,131 | 771 | 461 | 310 | 100 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- http://members.shaw.ca/el.supremo/MagickWand/3dlogo.htm
-- Better 3-D Logo Generation example
-- http://www.imagemagick.org/Usage/advanced/#3d-logos-2
import Graphics.ImageMagick.MagickWand
main :: IO ()
main = do
withMagickWandGenesis $ do
localGenesis $ do... | flowbox-public/imagemagick | examples/3dlogo.hs | apache-2.0 | 7,006 | 0 | 15 | 2,441 | 1,133 | 579 | 554 | 102 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Language.Embedded.Signature where
import Data.Proxy
import Language.C.Monad
import Language.Embedded.Expression
import Language.Embedded.Backend.C.Expression
import Language.C.Quote.C
... | kmate/imperative-edsl | src/Language/Embedded/Signature.hs | bsd-3-clause | 3,111 | 0 | 15 | 1,041 | 1,205 | 608 | 597 | -1 | -1 |
{-# LANGUAGE GADTs, DisambiguateRecordFields #-}
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
module CmmProcPoint
( ProcPointSet, Status(..)
, callProcPoints, minimalProcPointSet
, addProcPointProtocols, splitAtProcPoints, procPointAnalysis
)
where
import Prelude hiding (last, unzip, succ, zip)... | mcmaniac/ghc | compiler/cmm/CmmProcPoint.hs | bsd-3-clause | 26,213 | 0 | 20 | 8,263 | 4,323 | 2,212 | 2,111 | 275 | 14 |
{-# LANGUAGE NoMonomorphismRestriction, RankNTypes #-}
{-# LANGUAGE FunctionalDependencies, MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts, ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module T2239 where
data A = A
data B = B
class C a where c :: a -> String
instance C Bool where... | bitemyapp/ghc | testsuite/tests/indexed-types/should_fail/T2239.hs | bsd-3-clause | 1,687 | 0 | 10 | 409 | 464 | 254 | 210 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-| DRBD proc file parser
This module holds the definition of the parser that extracts status
information from the DRBD proc file.
-}
{-
Copyright (C) 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public... | vladimir-ipatov/ganeti | src/Ganeti/Storage/Drbd/Parser.hs | gpl-2.0 | 13,107 | 0 | 26 | 3,130 | 2,904 | 1,429 | 1,475 | 265 | 4 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Criterion.Main
import System.Random
import BenchmarkTypes
import qualified Data.OrdPSQ.Benchmark as OrdPSQ
import qualified Data.IntPSQ.Benchmark as IntPSQ
import qualified Data.HashPSQ.Benchmark ... | ariep/psqueues | benchmarks/Main.hs | bsd-3-clause | 2,013 | 0 | 10 | 544 | 403 | 232 | 171 | 42 | 1 |
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving, QuasiQuotes, TemplateHaskell, CPP, GADTs, TypeFamilies, OverloadedStrings, FlexibleContexts, FlexibleInstances, EmptyDataDecls, MultiParamTypeClasses #-}
module MaxLenTest (
specs
#ifndef WITH_NOSQL
, maxlenMigrate
#endif
) where
... | pseudonom/persistent | persistent-test/src/MaxLenTest.hs | mit | 1,351 | 0 | 15 | 393 | 278 | 143 | 135 | 26 | 2 |
main = print "Hello world"
| sdiehl/ghc | testsuite/tests/driver/T17143.hs | bsd-3-clause | 28 | 0 | 5 | 6 | 9 | 4 | 5 | 1 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="de-DE">
<title>AJAX Spider | ZAP Extensions</title>
<maps>
<homeID>top</homeID>
<mapref... | kingthorin/zap-extensions | addOns/spiderAjax/src/main/javahelp/org/zaproxy/zap/extension/spiderAjax/resources/help_de_DE/helpset_de_DE.hs | apache-2.0 | 972 | 78 | 66 | 159 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE CPP, GADTs #-}
-----------------------------------------------------------------------------
--
-- Generating machine code (instruction selection)
--
-- (c) The University of Glasgow 1996-2004
--
-----------------------------------------------------------------------------
-- This is a big module, but, i... | forked-upstream-packages-for-ghcjs/ghc | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | 57,030 | 0 | 25 | 19,024 | 13,673 | 6,783 | 6,890 | -1 | -1 |
module T15369 where
x :: Int
x = 1
| sdiehl/ghc | testsuite/tests/ghci/should_run/T15369.hs | bsd-3-clause | 35 | 0 | 4 | 9 | 14 | 9 | 5 | 3 | 1 |
{-# LANGUAGE TypeOperators #-}
module AnnotationLet (foo) where
{
import qualified Data.List as DL
;
foo = let
a 0 = 1
a _ = 2
b = 2
in a b
;
infixr 8 +
;
data ((f + g)) a = InL (f a) | InR (g a)
;
}
| siddhanathan/ghc | testsuite/tests/ghc-api/annotations/AnnotationLet.hs | bsd-3-clause | 231 | 2 | 9 | 83 | 90 | 56 | 34 | 10 | 2 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE Arrows #-}
module Yage.Rendering.Pipeline.Deferred.Bloom
( addBloom
) where
import Yage.Prelude hiding ((</>), foldM, cons, (++))
import Yage.Lens
import Yage.Math (V2(V2))
import Control.Arrow
import ... | MaxDaten/yage | src/Yage/Rendering/Pipeline/Deferred/Bloom.hs | mit | 2,393 | 1 | 20 | 586 | 644 | 357 | 287 | -1 | -1 |
module E04.A3
where
-- We revisit the former assignment from exercise 1 and redo it using a few
-- helpful builtin Haskell functions:
-- http://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html#v:reverse
-- http://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html#v:filter
-- http://hackage.haskell.or... | sebschrader/programmierung-ss2015 | E04/A3.hs | mit | 1,595 | 0 | 8 | 316 | 283 | 162 | 121 | 12 | 1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE OverloadedStrings #-}
module ClassFileParser
( parseJavaClass
, parseOnlyJavaClass
, javaClass
) where
import JavaClass
import Data.Array (array, (!))
import Data.Attoparsec.ByteString
import Data.Binary.IEEE754 (wordToFloat, wordToDouble)
import Data.Bits
impo... | MichaeGon/java | ClassFileParser.hs | mit | 14,909 | 0 | 17 | 4,097 | 4,383 | 2,228 | 2,155 | 333 | 25 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
module Database where
import Control.Applicative
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BL
import Control.Exception
import qualified Data.Text as T
im... | habbler/immo | Database.hs | mit | 3,689 | 0 | 26 | 945 | 1,026 | 540 | 486 | 83 | 2 |
import Control.Monad
import Data.List
diff line1 line2 = length (line1 \\ line2) + length (line2 \\ line1)
main :: IO ()
main = do
line1 <- getLine
line2 <- getLine
let ans = diff line1 line2
print ans
| mgrebenets/hackerrank | alg/strings/make-it-anagram.hs | mit | 221 | 0 | 10 | 57 | 94 | 45 | 49 | 9 | 1 |
import qualified Data.Vector as Vec
import Graphics.Perfract
import Graphics.Perfract.Shape
-- . . . .
-- . o o .
-- .o/\ /\o.
-- \/__\/
-- | |
-- |__|
sqrHair :: RecFig3
sqrHair = RecFig3 basicCube
(Vec.fromList
[ Prz3 (XYZ 1.6 0.4 0.4) (ratRot $ 0.1) (0.6)
, Prz3 (XYZ 1.6 (-0.4) (-... | dancor/perfract | src/Main3d.hs | mit | 398 | 0 | 13 | 111 | 137 | 78 | 59 | 10 | 1 |
module J2S.AI.RandomTest
( randomTests
) where
import Control.Monad.Random
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck
import System.Random (mkStdGen)
import qualified J2S as AI
import qualified J2S.Game.Mock as M
randomTests = testGroup "Test... | berewt/J2S | test/J2S/AI/RandomTest.hs | mit | 574 | 0 | 11 | 102 | 139 | 83 | 56 | 13 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Pos.Diffusion.Full
( FullDiffusionConfiguration (..)
, diffusionLayerFull
, di... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Diffusion/Full.hs | mit | 28,050 | 0 | 22 | 8,890 | 4,741 | 2,597 | 2,144 | -1 | -1 |
{-# htermination (==) :: Ordering -> Ordering -> Bool #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_EQEQ_7.hs | mit | 58 | 0 | 2 | 10 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Handler.Api.Snippets where
import Import
import qualified Data.Aeson as Aeson
import qualified GHC.Generics as GHC
import qualified Handler.Snippets as SnippetsHandler
import qualified Handler.Snippet as SnippetHandler
import qualified Handl... | prasmussen/glot-www | Handler/Api/Snippets.hs | mit | 10,483 | 0 | 21 | 2,794 | 2,525 | 1,292 | 1,233 | -1 | -1 |
-- |
-- Reexports of most definitions from \"mtl\" and \"transformers\".
--
-- For details check out the source.
module MTLPrelude
(
module Exports,
)
where
-- Cont
-------------------------
import Control.Monad.Cont.Class
as Exports
import Control.Monad.Trans.Cont
as Exports
hiding (callCC)
-- Except
-... | nikita-volkov/mtl-prelude | library/MTLPrelude.hs | mit | 1,879 | 0 | 6 | 276 | 364 | 268 | 96 | 46 | 0 |
{-# htermination zip3 :: [a] -> [b] -> [c] -> [(a,b,c)] #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_zip3_1.hs | mit | 60 | 0 | 2 | 12 | 3 | 2 | 1 | 1 | 0 |
module Irg.Lab1.Bresenham (bresenham) where
import Data.List (sort,unfoldr)
bresenham :: (Num a, Ord a) => (a, a) -> (a, a) -> [(a, a)]
bresenham pa@(xa,ya) pb@(xb,yb) = map maySwitch . unfoldr go $ (x1,y1,0)
where
steep = abs (yb - ya) > abs (xb - xa)
maySwitch = if steep then (\(x,y) -> (y,x)) else id
... | DominikDitoIvosevic/Uni | IRG/src/Irg/Lab1/Bresenham.hs | mit | 819 | 0 | 12 | 254 | 397 | 228 | 169 | 17 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Y2017.M12.D15.Solution where
import Data.Maybe (fromJust)
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as T
import Network.HTTP (urlEncode)
import System.Directory
{--
New topic!
Today we're going to create an oembed service where we serve so... | geophf/1HaskellADay | exercises/HAD/Y2017/M12/D15/Solution.hs | mit | 5,465 | 0 | 15 | 950 | 894 | 490 | 404 | 58 | 2 |
{-# htermination plusFM_C :: (b -> b -> b) -> FiniteMap Ordering b -> FiniteMap Ordering b -> FiniteMap Ordering b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_plusFM_C_11.hs | mit | 136 | 0 | 3 | 24 | 5 | 3 | 2 | 1 | 0 |
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Network.UPnP.Types where
import Data.String
import Data.Word
import Data.Int
import Data.ByteString (ByteString)
import Network.URI
import Text.XML.Light
import Network.SSDP.Types
type ActionNam... | mcmaniac/ssdp-upnp | src/Network/UPnP/Types.hs | mit | 4,064 | 0 | 11 | 1,303 | 817 | 489 | 328 | -1 | -1 |
module Types (
WidgetTree(..),
FunctionArgs(..),
Function(..),
Class(..),
Attribute(..),
Fluid,
FluidBlock(..),
UnbrokenOrBraced(..),
BracedStringParts(..),
HaskellIdentifier(..),
ModuleIdentifier(..),
PathElem(..),
Path,
PathIndexedElements,
FluidElement(..),
Name,
Na... | deech/fltkhs | src/Fluid/Types.hs | mit | 3,866 | 0 | 8 | 869 | 988 | 611 | 377 | 159 | 0 |
{- |
Module : ./TPTP/Prover/Vampire.hs
Description : Interface for the Vampire theorem prover.
Copyright : (c) Eugen Kuksa University of Magdeburg 2017
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Eugen Kuksa <kuksa@iks.cs.ovgu.de>
Stability : provisional
Portability : non-portable (imp... | spechub/Hets | TPTP/Prover/Vampire.hs | gpl-2.0 | 3,082 | 0 | 15 | 815 | 515 | 281 | 234 | 55 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module MusicBrainz.API.Iswc ( findByWorks ) where
import Control.Applicative
import Data.Map
import Data.Text
import Text.Digestive
import qualified Data.Set as Set
import MusicBrainz
import MusicBrainz.API
import qualified MusicBrainz.Data.Work as MB
findByWorks :: Form Text Musi... | metabrainz/musicbrainz-data-service | src/MusicBrainz/API/Iswc.hs | gpl-2.0 | 479 | 0 | 11 | 63 | 137 | 79 | 58 | 13 | 1 |
module Phascal.Types where
data Type = TyInt | TyBool deriving(Show, Eq)
| zenhack/phascal | src/Phascal/Types.hs | gpl-3.0 | 74 | 0 | 6 | 12 | 27 | 16 | 11 | 2 | 0 |
module PulseLambda.CodeStream
( CodeStream
, getInQueue
, getStreamLocation
, fromString
, getCurrChar
, goNext
, isEof
, skipWhile
, readWhile
, readWhileWithMax
) where
import PulseLambda.Location
import Data.Maybe
data CodeStream
= StringStream
{ getInQueue :: String
, getStreamLocation :: Loca... | brunoczim/PulseLambda | PulseLambda/CodeStream.hs | gpl-3.0 | 1,893 | 0 | 14 | 427 | 659 | 349 | 310 | 49 | 2 |
{-|
Module : State
Copyright : (c) 2014 Kaashif Hymabaccus
License : GPL-3
Maintainer : kaashif@kaashif.co.uk
Stability : experimental
Portability : POSIX
-}
module State where
import qualified Player
import qualified Board
import String
-- | Data structure passed around by the main game loop
data State... | kaashif/venture | src/State.hs | gpl-3.0 | 2,953 | 4 | 12 | 792 | 607 | 333 | 274 | 39 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/MobileDevices/Get.hs | mpl-2.0 | 3,903 | 0 | 17 | 917 | 475 | 282 | 193 | 79 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/TagBindings/List.hs | mpl-2.0 | 6,125 | 0 | 18 | 1,392 | 896 | 522 | 374 | 124 | 1 |
-- | This module describes internal states and transformations en those
--
-- Internal state should be kept in every part of the ject at its minimal and
-- thus there are multiple state datatypes for different parts of inerpreter
--
-- Transformations between different states should also be provided in this file
module... | frantisekfarka/CoALP | inter/CoALPj/InternalState.hs | lgpl-3.0 | 2,289 | 55 | 11 | 470 | 531 | 313 | 218 | 53 | 1 |
module SimpleJSON2
(
JValue (..)
, getString
, getInt
, getDouble
, getObject
, getArray
, isNull
) where
data JValue = JString String
| JNumber Double
| JBool Bool
| JNull
| JObject [(Strin... | caiorss/Functional-Programming | haskell/rwh/ch05/SimpleJSON2.hs | unlicense | 1,118 | 0 | 8 | 441 | 350 | 185 | 165 | 38 | 2 |
module PowerDivisibility.A019554Spec (main, spec) where
import Test.Hspec
import PowerDivisibility.A019554 (a019554)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A019554" $
it "correctly computes the first 20 elements" $
take 20 (map a019554 [1..]) `shouldBe` expectedValue where
expectedV... | peterokagey/haskellOEIS | test/PowerDivisibility/A019554Spec.hs | apache-2.0 | 377 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
module External.A053797Spec (main, spec) where
import Test.Hspec
import External.A053797 (a053797)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A053797" $
it "correctly computes the first 20 elements" $
take 20 (map a053797 [1..]) `shouldBe` expectedValue where
expectedValue = [1,2,1,1,1,... | peterokagey/haskellOEIS | test/External/A053797Spec.hs | apache-2.0 | 351 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
import System.Environment (getArgs)
import Control.Monad
import BridgeBuddy.Cards
import BridgeBuddy.OpeningBids
import BridgeBuddy.OpeningResponses
main :: IO ()
main = do
args <- getArgs
let num_decks =
case args of
[] -> 1
(x:_) -> (read x) :: Int
forM_ [1 .... | derekmcloughlin/BridgeBuddyServer | bridge-buddy/Main.hs | apache-2.0 | 1,524 | 0 | 17 | 510 | 494 | 242 | 252 | 45 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
module Language.K3.Driver.Service where
import Control.Arrow ( (&&&), second )
import Control.Concurrent
import Control.Concurre... | DaMSL/K3 | src/Language/K3/Driver/Service.hs | apache-2.0 | 61,571 | 225 | 62 | 16,406 | 17,818 | 9,487 | 8,331 | 979 | 37 |
module Vision where
import Data.List
import Data.Maybe
import Map
import Position
import Vision.Unrealistic
-- Brute force visibility algorithm
computeVisible :: GameMap -> Position -> GameMap
computeVisible map pos = doVisibilityBF map pos 0
doVisibilityBF :: GameMap -> Position -> Int -> GameMap
doVisibilityBF map... | CheeseSucker/haskell-roguelike | src/Vision.hs | bsd-2-clause | 1,013 | 0 | 11 | 312 | 358 | 183 | 175 | 21 | 2 |
-- ------------------------------------------------------------
{- |
Module : Yuuko.Control.Arrow.ArrowNF
Copyright : Copyright (C) 2005-8 Uwe Schmidt
License : MIT
Maintainer : Uwe Schmidt (uwe\@fh-wedel.de)
Stability : experimental
Portability: non-portable
Arrows for evaluation of no... | nfjinjing/yuuko | src/Yuuko/Control/Arrow/ArrowNF.hs | bsd-3-clause | 997 | 11 | 8 | 186 | 133 | 78 | 55 | 8 | 1 |
import Test.HUnit
import Data
import Functions
import Ratio
main = runTestTT tests
tests = TestList (tree ++ alg)
tree1 = read "((a+b)*(c-d))"::ExprTree Algebraic
tree2 = read "((a+b)/(c-d))"::ExprTree Algebraic
tree3 = read "((a+b)+c)"::ExprTree Algebraic
tree4 = read "((a+b)+1%2)"::ExprTree Algebraic
ltree1 = rela... | epsilonhalbe/Algebra-Alchemy | tFunctions.hs | bsd-3-clause | 2,410 | 3 | 19 | 765 | 847 | 432 | 415 | 45 | 1 |
{-# LANGUAGE ScopedTypeVariables, MultiParamTypeClasses, KindSignatures #-}
module EFA2.Interpreter.Arith where
{-
import qualified Data.Vector.Unboxed as UV
import Data.Ratio
-}
--type Val = Ratio Integer
type Val = Double
type Container = []
--type Container = UV.Vector
{-
-- ATTENTION on operator presedence:... | energyflowanalysis/efa-2.1 | attic/src/EFA2/Interpreter/Arith.hs | bsd-3-clause | 1,428 | 0 | 5 | 536 | 26 | 19 | 7 | 4 | 0 |
-- | Common functionality for rendering pretty output.
module DataFlow.PrettyRenderer where
import Control.Monad.State
import Control.Monad.Writer
type Indent = Int
type IndentNext = Bool
data RendererState = RendererState Indent IndentNext
-- | The Renderer represents some output generator that runs on a 'Diagram'.... | sonyxperiadev/dataflow | src/DataFlow/PrettyRenderer.hs | bsd-3-clause | 1,339 | 0 | 11 | 254 | 383 | 197 | 186 | 31 | 2 |
{-# LANGUAGE
FlexibleContexts
, GADTs
, Rank2Types
, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Main (main) where
import Control.Applicative
import Control.Monad.ST
import qualified Control.Monad.ST.Lazy as Lazy
import Data.ByteArraySlice
import Data.Int
import Data.Tupl... | sonyandy/var | tests/properties.hs | bsd-3-clause | 12,307 | 0 | 18 | 3,543 | 4,391 | 2,202 | 2,189 | 323 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.DrawInstanced
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
----------------... | haskell-opengl/OpenGLRaw | src/Graphics/GL/EXT/DrawInstanced.hs | bsd-3-clause | 651 | 0 | 4 | 89 | 47 | 36 | 11 | 7 | 0 |
module Main where
import Lib
main :: IO ()
main = someFunc
{-99 Haskell Problems-}
{-| Get the last element of a list-}
myLast :: [a] -> a
myLast [x] = x
myLast (_:xs) = myLast xs
{-| Get the second to last element of a list-}
myButtLast :: [a] -> a
myButtLast [x, _] = x
myButtLast (_:xs) = myButtLast xs
{-| Get... | MauriceIsAG/HaskellScratch | .stack-work/intero/intero19793okA.hs | bsd-3-clause | 7,055 | 0 | 18 | 2,298 | 3,617 | 1,915 | 1,702 | 186 | 3 |
module Data.Classifier
( Classifier(Classifier)
, empty
, train
, classify
)
where
import Data.Char
import Data.Function
import Data.Maybe
import Data.Tokenizer
import qualified Data.List as L
import qualified Data.Map as M
data Classifier = Classifier {
ccount :: M.Map String Int
, wcou... | derek-schaefer/haskell-classifier | src/Data/Classifier.hs | bsd-3-clause | 2,857 | 0 | 15 | 646 | 1,060 | 558 | 502 | 60 | 1 |
-- |
-- Module: Utils
-- Description: Utility bounded-list functions (e.g., folds, scans, etc.)
-- Copyright: (c) 2011 National Institute of Aerospace / Galois, Inc.
--
-- Utility bounded-list functions (e.g., folds, scans, etc.)
module Copilot.Library.Utils
( -- * Functions similar to the Prelude functions on ... | fredyr/copilot-libraries | src/Copilot/Library/Utils.hs | bsd-3-clause | 3,800 | 0 | 13 | 1,433 | 1,280 | 647 | 633 | 73 | 4 |
module Zero.Account.Profile.Handlers
(
profile
) where
------------------------------------------------------------------------------
import Servant (Handler(..))
import Zero.View.Handlers (makeProtectedView, makeView)
import Zero.View (View(..))
import Zero.Account.Pro... | et4te/zero | server/src/Zero/Account/Profile/Handlers.hs | bsd-3-clause | 558 | 0 | 8 | 99 | 105 | 65 | 40 | 11 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
[@ISO639-1@] -
[@ISO639-2@] ast
[@ISO639-3@] ast
[@Native name@] asturianu
[@English name@] Asturian
-}
module Text.Numeral.Language.AST.TestDa... | telser/numerals | src-test/Text/Numeral/Language/AST/TestData.hs | bsd-3-clause | 5,885 | 0 | 8 | 1,789 | 1,534 | 1,025 | 509 | 172 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE NoNamedWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Foldable.Singlet... | goldfirere/singletons | singletons-base/src/Data/Foldable/Singletons.hs | bsd-3-clause | 23,443 | 0 | 10 | 7,023 | 1,038 | 687 | 351 | -1 | -1 |
module Data.AS3.AST.Grammar.Expressions where
import Control.Monad
import Data.AS3.AST.Def
import Data.AS3.AST.Grammar.Lexicon
import Data.AS3.AST.Prims
import Data.AS3.AST.ThirdParty
import Text.Parsec
-- $11.1 Primary Expressions
primary_expression :: As3... | phylake/AS3-AST | Data/AS3/AST/Grammar/Expressions.hs | bsd-3-clause | 10,495 | 0 | 19 | 2,280 | 2,248 | 1,136 | 1,112 | 239 | 2 |
{-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, UnboxedTuples #-}
{-# OPTIONS_GHC -fno-full-laziness -funbox-strict-fields #-}
-- | Zero based arrays.
--
-- Note that no bounds checking are performed.
module Data.HashMap.Array
( Array
, MArray
-- * Creation
, new
, new_
, singleton
... | hvr/unordered-containers | Data/HashMap/Array.hs | bsd-3-clause | 12,474 | 0 | 13 | 3,583 | 3,904 | 1,988 | 1,916 | -1 | -1 |
{-# LANGUAGE BangPatterns, PatternGuards #-}
module Ant.Renderer where
import Control.Monad
import Graphics.Rendering.Cairo
import qualified Data.Vector as V
import Ant.Game
import Ant.Scheduler
import Data.Colour.SRGB
import Data.Colour.Names
import Data.Colour.RGBSpace
import Data.Colour.RGBSpace.HSV
import Dat... | Saulzar/Ants | Ant/Renderer.hs | bsd-3-clause | 7,774 | 0 | 20 | 2,222 | 2,724 | 1,346 | 1,378 | 168 | 4 |
module Sortier.Programm.Check where
import Sortier.Common.Util
import Sortier.Common.Config
import Sortier.Programm.Type
import Sortier.Programm.Exec
import Sortier.Programm.Example
import qualified Autolib.Util.Wort ( alle )
import Data.List ( tails)
import Data.Typeable
import Autolib.Reporter
import Autolib.ToDo... | florianpilz/autotool | src/Sortier/Programm/Check.hs | gpl-2.0 | 2,272 | 22 | 24 | 540 | 562 | 306 | 256 | -1 | -1 |
import Distribution.Simple
import Distribution.Simple.Setup ( BuildFlags )
import Distribution.Simple.LocalBuildInfo ( LocalBuildInfo )
import Distribution.PackageDescription ( PackageDescription
, HookedBuildInfo
... | MortimerMcMire315/sparkive | Setup.hs | gpl-3.0 | 1,020 | 0 | 12 | 345 | 188 | 100 | 88 | 20 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-rds/gen/Network/AWS/RDS/ApplyPendingMaintenanceAction.hs | mpl-2.0 | 5,561 | 0 | 9 | 1,079 | 564 | 346 | 218 | 70 | 1 |
{-# LANGUAGE BangPatterns, CPP, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
--
-- The register allocator
--
-- (c) The University of Glasgow 2004
--
-----------------------------------------------------------------------------
{-
The algorithm is roughly:
1... | olsner/ghc | compiler/nativeGen/RegAlloc/Linear/Main.hs | bsd-3-clause | 37,782 | 108 | 23 | 13,352 | 5,403 | 2,884 | 2,519 | 460 | 13 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Stack.PackageDump
( Line
, eachSection
, eachPair
, DumpPa... | mathhun/stack | src/Stack/PackageDump.hs | bsd-3-clause | 16,673 | 23 | 37 | 5,382 | 4,236 | 2,181 | 2,055 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Pentomino.Find where
import qualified Pentomino.Position as P
import Pentomino.Cover (
roll_shift, pieces, covers, reach, unreach, form, orig, Figure
, halo, area, modify, figure_shift, Piece(..), container
, points, spoints
)
import Pentomino... | Erdwolf/autotool-bonn | src/Pentomino/Find.hs | gpl-2.0 | 8,071 | 36 | 20 | 2,918 | 2,750 | 1,468 | 1,282 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Bead.View.Content.GroupRegistration.Page (
groupRegistration
, unsubscribeFromCourse
) where
import Control.Monad
import Control.Arrow ((***))
import Data.List (intersperse)
import Data.String (fromString)
import Text.... | andorp/bead | src/Bead/View/Content/GroupRegistration/Page.hs | bsd-3-clause | 4,339 | 0 | 20 | 963 | 1,090 | 559 | 531 | 88 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
-- | This module provides a simple dialog widget. You get to pick the
-- dialog title, if any, as well as its body and buttons.
module Brick.Widgets.Dialog
( Dialog
, dialogTitle
, dialogName
, dialogButtons
, dialogSelectedIndex
, dialogWi... | ktvoelker/brick | src/Brick/Widgets/Dialog.hs | bsd-3-clause | 4,590 | 0 | 17 | 1,273 | 948 | 528 | 420 | 89 | 3 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- instance MonadThings is necessarily an
-- orphan
module TcEnv(
TyThing(..), TcTyThing(..), TcId,
-- Instance environment, and InstInfo type
... | AlexanderPankiv/ghc | compiler/typecheck/TcEnv.hs | bsd-3-clause | 35,875 | 6 | 18 | 10,433 | 6,282 | 3,313 | 2,969 | 477 | 6 |
module Test.LongWeekYears where
import Data.Time.Calendar.WeekDate
import Data.Time.Calendar
import Test.TestUtil
import Test.LongWeekYearsRef
longYear :: Integer -> Bool
longYear year = case toWeekDate (fromGregorian year 12 31) of
(_,53,_) -> True
_ -> False
showLongYear :: Integer -> String
showLongYear year
... | bergmark/time | test/Test/LongWeekYears.hs | bsd-3-clause | 580 | 0 | 10 | 107 | 188 | 103 | 85 | 16 | 3 |
module C1 where
import D1
sumSquares1 (x:xs) = sq x + sumSquares1 xs
sumSquares1 [] = 0
| kmate/HaRe | old/testing/addOneParameter/C1.hs | bsd-3-clause | 99 | 0 | 7 | 28 | 42 | 22 | 20 | 4 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="bs-BA">
<title>Quick Start | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref... | ccgreen13/zap-extensions | src/org/zaproxy/zap/extension/quickstart/resources/help_bs_BA/helpset_bs_BA.hs | apache-2.0 | 973 | 80 | 66 | 160 | 421 | 212 | 209 | -1 | -1 |
module LinkerUnload (init) where
import GHC
import DynFlags
import Linker
import System.Environment
import MonadUtils ( MonadIO(..) )
foreign export ccall loadPackages :: IO ()
loadPackages :: IO ()
loadPackages = do
[libdir] <- getArgs
runGhc (Just libdir) $ do
dflags <- getSessionDynFlags
let dflags' =... | sdiehl/ghc | testsuite/tests/rts/linker/LinkerUnload.hs | bsd-3-clause | 517 | 0 | 14 | 120 | 152 | 80 | 72 | 17 | 1 |
module IntegerConversionRules where
import Data.Word
f1 :: Int -> Double
f1 = fi
f2 :: Int -> Float
f2 = fi
f3 :: Int -> Int
f3 = fi
f4 :: Int -> Word
f4 = fi
fi :: (Integral a, Num b) => a -> b
fi = fromIntegral
| frantisekfarka/ghc-dsi | testsuite/tests/lib/integer/IntegerConversionRules.hs | bsd-3-clause | 221 | 0 | 6 | 58 | 94 | 54 | 40 | 12 | 1 |
module B where
b :: Char
b = 'b'
| urbanslug/ghc | testsuite/tests/driver/dynamicToo/dynamicToo004/pkg2/B.hs | bsd-3-clause | 35 | 0 | 4 | 11 | 14 | 9 | 5 | 3 | 1 |
{-# LANGUAGE DataKinds, TypeOperators, PolyKinds, FlexibleInstances, FlexibleContexts #-}
module T7095 where
data Wrapped t = Wrapped
class Len l where
len :: l -> Int
instance Len (Wrapped '[]) where
len = const 0
instance (Len (Wrapped xs)) => Len (Wrapped (x ': xs)) where
len x = 1 + (len $ wrapped... | urbanslug/ghc | testsuite/tests/polykinds/T7095.hs | bsd-3-clause | 744 | 0 | 9 | 162 | 196 | 105 | 91 | 13 | 1 |
import Prelude (IO)
import Yesod.Default.Config (fromArgs)
import Yesod.Default.Main (defaultMain)
import Settings (parseExtra)
import Application (makeApplication)
main :: IO ()
main = defaultMain (fromArgs parseExtra) makeApplication
| Tener/deeplearning-thesis | yesod/abaloney/app/main.hs | bsd-3-clause | 273 | 0 | 7 | 62 | 73 | 42 | 31 | 7 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Futhark.Internalise.AccurateSizes
( shapeBody
, annotateArrayShape
, argShapes
, ensureResultShape
, ensureResultExtShape
, ensureExtShape
, ensureShape
, ensureArgShapes
)
where
import Control.Applicative
import Control.Monad
import Data.Loc
import qualifie... | ihc/futhark | src/Futhark/Internalise/AccurateSizes.hs | isc | 4,454 | 0 | 17 | 1,257 | 1,388 | 673 | 715 | 100 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Spock.Safe
import qualified Templates.Helpers as T
import qualified Templates.Pages as P
import qualified Files.Helpers as F
import qualified Data.HashMap.Strict as H (lookup)
import Data.Text (unpack)
import Control.Monad.IO.Class (liftIO)
i... | ifo/onetimefiles.com | src/Main.hs | isc | 1,449 | 0 | 26 | 512 | 398 | 201 | 197 | 44 | 5 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Strict #-}
-- | Internalising bindings.
module Futhark.Internalise.Bindings
( internaliseAttrs,
internaliseAttr,
bindingFParams,
bindingLoopParams,
bindingLambdaParams,
stmPat,
)
where
import Control.Monad.Reader hiding (mapM)
import Data.Bifuncto... | HIPERFIT/futhark | src/Futhark/Internalise/Bindings.hs | isc | 5,988 | 0 | 19 | 1,279 | 2,297 | 1,155 | 1,142 | 144 | 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.