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 UndecidableInstances #-}
module Language.ContextSemantics.Graph where
import Language.ContextSemantics.Common
import Language.ContextSemantics.Utilities
import Control.Arrow (second)
import Control.Monad
import qualified Data.IntMap as IM
import qualified Data.Foldable as F
import Data.List
import qual... | batterseapower/context-semantics | Language/ContextSemantics/Graph.hs | bsd-3-clause | 7,002 | 0 | 17 | 1,648 | 2,363 | 1,244 | 1,119 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiWayIf #-}
module Text.PDDL.SExp (
SExp(..)
, parseSExp
, ParseError(..)
) where
import Control.Applicative ( Applicative(..) )
import Text.PDDL.Location
( Source, SrcLoc(..... | elliottt/pddl | src/Text/PDDL/SExp.hs | bsd-3-clause | 6,241 | 0 | 18 | 2,504 | 2,009 | 1,020 | 989 | 178 | 7 |
--------------------------------------------------------------------------------
-- |
-- Module : Sound.OpenAL.ALC.Capture
-- Copyright : (c) Sven Panne 2005
-- License : BSD-style (see the file libraries/OpenAL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : provisional
-- Portabili... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenAL/Sound/OpenAL/ALC/Capture.hs | bsd-3-clause | 5,473 | 27 | 15 | 726 | 997 | 542 | 455 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}
module Main (main) where
import Help.Imports
import Help.Logging
import Help.Settings
import Help.UI.WebSearch
import Help.UI.AdminConsole
import Data.Conduit (runResourceT)
import Control.Concurrent hiding (forkIO)
import Control.Concurrent.STM
import Control.Concur... | argiopetech/help | Main.hs | bsd-3-clause | 1,270 | 0 | 18 | 285 | 363 | 199 | 164 | 27 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ConstraintKinds #-}
-- |
-- Module : System.Rados.Monadic
-- Copyright : (c) 2010-2014 An... | anchor/rados-haskell | src/System/Rados/Monadic.hs | bsd-3-clause | 22,702 | 0 | 20 | 6,053 | 4,143 | 2,227 | 1,916 | -1 | -1 |
import "Lib/Prelude.hs"
unittest "not, null, iszero, even, odd" [
(not True, False),
(not False, True),
(null [], True),
(null [1], False),
(iszero 0, True),
(iszero 1, False),
(even 1, False),
(even 2, True),
(even 0, True),
(odd 0, False),
(odd 10... | ocean0yohsuke/Simply-Typed-Lambda | Start/UnitTest/Prelude.hs | bsd-3-clause | 2,980 | 2 | 20 | 949 | 1,758 | 1,018 | 740 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Coinbase.Exchange.Rest
( coinbaseGet
, coinbasePost
, coinbaseDelete
, coinbaseDeleteDiscardBody
, voidBody
) where
import Control.Monad.Except
import ... | AndrewRademacher/coinbase-exchange | src/Coinbase/Exchange/Rest.hs | mit | 8,084 | 0 | 22 | 3,345 | 1,922 | 993 | 929 | 149 | 6 |
import Drawing
import Exercises
import Geometry
main = drawPicture myPicture
myPicture points =
message ("Rotations" ++ ", angle(AOA')=" ++ shownum (angle a o a')
++ ", angle(XOX')=" ++ shownum (angle x o x'))
& red ( drawSegment (o,a)
& drawSegment (a,x)
& drawSe... | alphalambda/hsmath | src/Learn/Geometry/ex14rotate.hs | gpl-2.0 | 785 | 0 | 16 | 269 | 361 | 196 | 165 | 20 | 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="sq-AL">
<title>Support for the Open API Specification | ZAP Extension</title>
<maps>
<homeI... | veggiespam/zap-extensions | addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_sq_AL/helpset_sq_AL.hs | apache-2.0 | 1,000 | 80 | 66 | 164 | 423 | 214 | 209 | -1 | -1 |
{-
Copyright 2010-2012 Cognimeta Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | Cognimeta/perdure | src/Database/Perdure/Space.hs | apache-2.0 | 1,179 | 0 | 9 | 235 | 141 | 85 | 56 | 17 | 0 |
module Propellor.Property.Ssh (
PubKeyText,
setSshdConfig,
permitRootLogin,
passwordAuthentication,
hasAuthorizedKeys,
authorizedKey,
restarted,
randomHostKeys,
hostKeys,
hostKey,
pubKey,
getPubKey,
keyImported,
keyImported',
knownHost,
authorizedKeys,
listenPort
) where
import Propellor
import qualif... | avengerpenguin/propellor | src/Propellor/Property/Ssh.hs | bsd-2-clause | 8,752 | 124 | 19 | 1,638 | 2,491 | 1,279 | 1,212 | 181 | 2 |
module ParsecToken
{-# DEPRECATED "This module has moved to Text.ParserCombinators.Parsec.Token" #-}
(module Text.ParserCombinators.Parsec.Token) where
import Text.ParserCombinators.Parsec.Token
| alekar/hugs | fptools/hslibs/text/parsec/ParsecToken.hs | bsd-3-clause | 195 | 0 | 5 | 16 | 22 | 16 | 6 | 4 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE CPP #-}
module Codec.Picture.VectorByteConversion( blitVector
, toByteString
, imageFromUnsafePtr ) where
import Data.Word( Word8 )
import Data.Vector.Storab... | Chobbes/Juicy.Pixels | src/Codec/Picture/VectorByteConversion.hs | bsd-3-clause | 1,690 | 0 | 10 | 430 | 370 | 211 | 159 | 30 | 1 |
module Main (main) where
import Text.ParserCombinators.Parsec ( parse )
import Text.ParserCombinators.Parsec.Rfc2822
-- Read an Internet message from standard input, parse it,
-- and return the result.
main :: IO ()
main = do
input <- getContents
print $ parse message "<stdin>" (fixEol input)
return ()
-- Mak... | meteogrid/mime-mail-parser | example/message-test.hs | bsd-3-clause | 558 | 0 | 10 | 132 | 175 | 92 | 83 | 13 | 1 |
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
import Data.Functor.Identity
data HideArg f where
HideArg :... | sdiehl/ghc | testsuite/tests/pmcheck/should_compile/T17112.hs | bsd-3-clause | 761 | 0 | 11 | 147 | 233 | 125 | 108 | 24 | 1 |
module NN.Backend.Torch.Lua where
import Data.Word
import Language.Lua.Syntax
newtype LS = L String
-- |Handy typeclass for converting arguments
class ToLua a where
toLua :: a -> Exp
instance ToLua Word32 where
toLua = Number . show
instance ToLua LS where
toLua (L s') = String s'
... | sjfloat/dnngraph | NN/Backend/Torch/Lua.hs | bsd-3-clause | 1,073 | 0 | 9 | 237 | 410 | 213 | 197 | 29 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : RefacMerge
-- Copyright : (c) Christopher Brown 2006
--
-- Maintainer : cmb21@kent.ac.uk
-- Stability : provisional
-- Portability : portable
--
-- This module contains a transformation for HaRe.
-- Merging def... | kmate/HaRe | old/refactorer/RefacMerge.hs | bsd-3-clause | 35,107 | 397 | 24 | 12,150 | 10,186 | 5,420 | 4,766 | -1 | -1 |
import Control.Exception (assert)
main = assert False (putStrLn "OK")
| ezyang/ghc | testsuite/tests/driver/T13914/main.hs | bsd-3-clause | 71 | 1 | 7 | 10 | 30 | 14 | 16 | 2 | 1 |
main = putStrLn $ "Hello " ++ friends ++ family
where friends = "my friends"
family = " and family"
| beni55/ghcjs | test/fay/where.hs | mit | 110 | 2 | 7 | 30 | 36 | 16 | 20 | 3 | 1 |
-- file Spec.hs
import Test.Hspec
import Test.QuickCheck
import Control.Exception (evaluate)
import Euler40
-- 0.123456789101112131415161718192021...
main :: IO ()
main = hspec $ do
describe "Euler40" $ do
describe "digit" $ do
it "return correct digit in simple case" $ do
digit 1 `shouldBe` 1
... | kirhgoff/haskell-sandbox | euler40/specs.hs | mit | 1,126 | 1 | 24 | 376 | 389 | 190 | 199 | 35 | 1 |
module LexerGen(lexerGen,OutputFun(..)) where
import RegExp(Trans(..),Transducer)
import DFA(DFA(..),renumberEdges,tokenClasses,showDFA)
import Minimalize
import CompileRegExp(compile)
import DetMachineToHaskell(dfaToHaskell,OutputFun(..))
import PPrint(pprint)
import qualified Data.Map as OM(fromList)
import Spec.Has... | yav/haskell-lexer | generator/src/LexerGen.hs | mit | 2,222 | 10 | 14 | 503 | 537 | 324 | 213 | 39 | 3 |
-- Intermission: Exercises
-- Given the following datatype, answer the following questions:
data Mood = Blah | Woot deriving Show
-- 1. What is the type constructor, or name of this type?
-- Mood
-- 2. If the function requires a Mood value, what are the values you could possibly use there?
-- Blah, or Woot
-- 3. ... | diminishedprime/.org | reading-list/haskell_programming_from_first_principles/04_02.hs | mit | 1,069 | 0 | 5 | 207 | 47 | 33 | 14 | 3 | 1 |
module Data.CSV.Table.Types (
-- * Representation
Table (..)
, Row (..)
, Col (..)
, RowInfo
, TField (..)
, Order (..)
-- * Accessors
, getCols
, getRows
, lookupCol
-- * Parsing
, fromFile
, fromString
-- * Saving
, toFile
) where
import Text.Printf
import ... | ucsd-progsys/csv-table | src/Data/CSV/Table/Types.hs | mit | 3,451 | 0 | 11 | 906 | 840 | 462 | 378 | 59 | 2 |
module OptCracker
( OptionSet
, crack
, usage
) where
import Data.List (find)
import System.Console.GetOpt
( OptDescr(..)
, ArgDescr (..)
, ArgOrder (..)
, getOpt
, usageInfo )
type OptionSet = (Bool, Maybe Int)
data CommandOption = Help | Port !String
deriving (Eq, Show)
cr... | AstralMining/astral-mining-server | src/OptCracker.hs | mit | 1,379 | 0 | 9 | 375 | 499 | 273 | 226 | 45 | 4 |
module Target
( Target
, load
, render
, expand
, theme
, ext
, debug
, write
, writeTemp
) where
import Control.Applicative
import Control.Monad
import Control.Dangerous hiding ( Warning, result )
import Control.Monad.Trans
import Data.Configger ( Config )
import Data.Focus hidi... | Soares/Bookbuilder | src/Target.hs | mit | 5,686 | 28 | 13 | 1,381 | 1,784 | 910 | 874 | 138 | 3 |
import Data.ByteString.Delta (diff, patch)
import Control.Applicative ((<$>))
import Control.Exception (evaluate)
import Control.Monad (replicateM, forM_)
import Data.Function (on)
import Data.List (sortBy)
import Data.String (IsString(fromString))
import Data.Word (Word8)
import Test.QuickCheck (Arbitrary(arbitrary),... | joeyadams/haskell-bytestring-delta | Tests.hs | mit | 3,309 | 9 | 16 | 943 | 1,123 | 598 | 525 | 75 | 4 |
module Main where
import Bio.Data.Bed
import Bio.Data.Bed.Utils
import Bio.Motif
import Bio.Seq.IO
import Conduit
import Data.Default (def)
import Data.Semigroup ((<>))
import Data.Version ... | kaizhang/bioinformatics-toolkit | bioinformatics-toolkit-apps/app/MotifScan.hs | mit | 1,591 | 0 | 17 | 545 | 428 | 225 | 203 | 41 | 1 |
module TeX.Parser.Util
( unimplemented
, optionalSpace, optionalSpaces
, equals
, number, eightBitNumber, count
, integerVariable, IntegerVariable(IntegerParameter, CountDefToken, LiteralCount)
)
where
import Text.Parsec ((<|>), (<?>), choice)
import TeX.Category
import TeX.Count
import TeX.Parser.Expand
import TeX.P... | spicyj/tex-parser | src/TeX/Parser/Util.hs | mit | 3,361 | 0 | 16 | 582 | 988 | 526 | 462 | 101 | 2 |
module QuickSort where
-- http://en.literateprograms.org/Quicksort_(Haskell)
-- http://en.wikipedia.org/wiki/Quicksort
quickSort [] = []
quickSort [x] = [x]
quickSort (pivot:xs) = (quickSort smaller) ++ [pivot] ++ (quickSort larger)
where smaller = filter (<= pivot) xs
larger = filter (> pivot) xs
| millertime-homework/cs350report | haskell/QuickSort.hs | mit | 305 | 1 | 9 | 44 | 101 | 56 | 45 | 6 | 1 |
module TSPGraph (
presentUI
) where
import Graphics.Gloss
import TSPLib
import Data.Monoid
import Data.Functor
import Control.Arrow ((***))
imgWidth, imgHeight :: Int
imgWidth = 600
imgHeight = 600
main :: IO ()
main = do
(nodes, edges) <- parseInput
presentUI nodes edges
presentUI :: [Node] -> [Edge] ->... | shouya/thinking-dumps | tsp/TSPGraph.hs | mit | 2,327 | 0 | 15 | 592 | 1,001 | 540 | 461 | 58 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Web.TodoMVC.Servant.API (
runServer
) where
import Network.Wai
import Network.W... | adarqui/todomvc-haskell-servant-purescript | haskell_src/Web/TodoMVC/Servant/API.hs | mit | 1,064 | 0 | 16 | 246 | 219 | 119 | 100 | -1 | -1 |
module GHCJS.DOM.IDBFactory (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/IDBFactory.hs | mit | 40 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module Target (
Target, target, context, builder, inputs, outputs, trackArgument
) where
import Data.Char
import Data.List.Extra
import qualified Hadrian.Target as H
import Hadrian.Target hiding (Target)
import Builder
import Context
type Target = H.Target Context Builder
-- | Some arguments do not affect ... | izgzhen/hadrian | src/Target.hs | mit | 816 | 0 | 9 | 157 | 165 | 97 | 68 | 14 | 2 |
{-# LANGUAGE CPP, NoImplicitPrelude, PackageImports #-}
module Foreign.Marshal.Unsafe.Compat (
module Base
) where
import "base-compat" Foreign.Marshal.Unsafe.Compat as Base
| haskell-compat/base-compat | base-compat-batteries/src/Foreign/Marshal/Unsafe/Compat.hs | mit | 177 | 0 | 4 | 21 | 25 | 19 | 6 | 4 | 0 |
data BalTree a = Empty
| TwoNode (BalTree a) a (BalTree a) a (BalTree a)
| OneNode (BalTree a) a (BalTree a)
| TwoLeaf a a
| OneLeaf a
-- deriving(Show)
-- declare BinTree a to be an instance of Show
instance (Show a) => Show (BalTree a) where
-- will start by a '<' before the root
-- and ... | Saevon/Recipes | haskell/23tree.hs | mit | 2,006 | 0 | 19 | 685 | 594 | 305 | 289 | 44 | 1 |
{-# LANGUAGE LambdaCase #-}
-- |
-- Module : Butter.Core.Torrent
-- Copyright : Pedro Tacla Yamada
-- License : MIT (see LICENSE)
--
-- Maintainer : Pedro Tacla Yamada <tacla.yamada@gmail.com>
-- Stability : unstable
-- Portability : unportable
--
-- The main `Torrent` data type
module Butter.Core.Torrent... | yamadapc/butter-core | src/Butter/Core/Torrent.hs | mit | 4,457 | 0 | 14 | 1,628 | 745 | 438 | 307 | 63 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
module BBQ.Sitemap where
import Prelude hidi... | yan-ac/bbq.yan.ac | BBQ/Sitemap.hs | mit | 2,783 | 0 | 19 | 680 | 774 | 426 | 348 | -1 | -1 |
module Latex2MathML.Utils.Functions(parseArguments,processContentOfFile,saveToFiles,readContentAndProcess) where
import Latex2MathML.Generator.Main
import Control.Monad.Trans.Either
import Control.Monad.Error.Class
import Data.Algorithms.KMP
import Latex2MathML.Scanner.Main
import Latex2MathML.Parser.Main
-- ARGUMENT... | fortun13/latex2mathml | src/Latex2MathML/Utils/Functions.hs | gpl-2.0 | 2,839 | 0 | 16 | 415 | 980 | 520 | 460 | 51 | 2 |
#!/usr/bin/runhugs
-- Calculates basic LCD monitor parameters from diagonals.
--
-- Copyright (c) bkil, 2009
-- License: GNU GPL v2 (or later), see the
-- attached gpl-2.0.txt for details.
--
--Changelog:
-- 2009.01.20 v0.0 first release
-- 2009.01.22 v0.1 refactoring: cleanup, typo in comments
-- 2009.01.29 v0.2 refa... | google-code/bkil-open | volatile/calc/lcd_geom.hs | gpl-2.0 | 4,460 | 0 | 14 | 1,168 | 1,344 | 748 | 596 | 83 | 4 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Rewriting.Roller where
import Rewriting.TRS
import Autolib.Util.Zufall
import Autolib.Set
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
roll_trs :: ( Symbol v, Symbol c )
=> Config v c
-> IO ( TRS v c )
roll_trs con... | Erdwolf/autotool-bonn | src/Rewriting/Roller.hs | gpl-2.0 | 2,780 | 0 | 18 | 894 | 993 | 506 | 487 | 72 | 2 |
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-}
module PGIP.GraphQL.Result.SignatureMorphism where
import PGIP.GraphQL.Result.IdReference
import PGIP.GraphQL.Result.LogicMapping
import PGIP.GraphQL.Result.Mapping
import PGIP.GraphQL.Result.SymbolMapping
import Data.Data
data SignatureMorphism =
SignatureMo... | spechub/Hets | PGIP/GraphQL/Result/SignatureMorphism.hs | gpl-2.0 | 632 | 0 | 9 | 178 | 108 | 71 | 37 | 15 | 0 |
import Prelude
import System.Environment ( getArgs )
import Data.List
import Data.Maybe
import Functions(makemove)
-- The main method that will be used for testing / command line access
main = do
args <- getArgs
pacFile <- readFile (head args)
map <- mapTuple pacFile
let
pac = map
in yourMain pac
partFourOutp... | cable729/plc2 | src/csce322a2p4.hs | gpl-3.0 | 718 | 2 | 10 | 136 | 196 | 106 | 90 | 19 | 1 |
{-# OPTIONS -Wall #-}
{-# LANGUAGE FlexibleInstances #-}
{-- Naive evaluation of SecPAL
-}
module Logic.SecPAL.Evaluable where
import Control.Applicative
import Control.Monad (when, forM)
import Data.Array.IO
import Data.List
import Data.Maybe
import Logic.General.Entities
import Logic.General.Constraints
import Logi... | bogwonch/SecPAL | src/Logic/SecPAL/Evaluable.hs | gpl-3.0 | 12,908 | 0 | 17 | 4,167 | 4,086 | 2,123 | 1,963 | 301 | 4 |
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, FlexibleInstances, ScopedTypeVariables #-}
{-|
Multi-column balance reports, used by the balance command.
-}
module Hledger.Reports.MultiBalanceReports (
MultiBalanceReport(..),
MultiBalanceReportRow,
multiBalanceReport
-- -- * Tests
-- tests_Hledger_Repor... | kmels/hledger | hledger-lib/Hledger/Reports/MultiBalanceReports.hs | gpl-3.0 | 8,756 | 0 | 19 | 2,461 | 1,803 | 971 | 832 | 105 | 8 |
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE Rank2Types #-}
module Shakugan.Util where
import Control.Lens
import qualified Data.Map as M
import qualified Data.Vector as V
import FreeGame
import FreeGame.Class (keyStates)
import Shakugan.Types
-- | Gets next... | Fuuzetsu/shakugan-no-haskell | src/Shakugan/Util.hs | gpl-3.0 | 2,389 | 0 | 19 | 609 | 560 | 292 | 268 | -1 | -1 |
module Language.SMTLib2.Strategy where
data Tactic
= Skip
| AndThen [Tactic]
| OrElse [Tactic]
| ParOr [Tactic]
| ParThen Tactic Tactic
| TryFor Tactic Integer
| If (Probe Bool) Tactic Tactic
| FailIf (Probe Bool)
| forall p. Show p => UsingParams (BuiltInTactic p) [p]
data Probe a where
ProbeBool... | hguenther/smtlib2 | Language/SMTLib2/Strategy.hs | gpl-3.0 | 7,439 | 0 | 13 | 2,967 | 2,044 | 995 | 1,049 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games/gen/Network/Google/Resource/Games/Applications/Verify.hs | mpl-2.0 | 4,919 | 0 | 18 | 1,191 | 710 | 415 | 295 | 106 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Collections/Delete.hs | mpl-2.0 | 5,171 | 0 | 18 | 1,222 | 803 | 466 | 337 | 115 | 1 |
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances, RecordWildCards #-}
module Store.Config
( Path(..)
, pathKey
, keyPath
, Value(..)
, ConfigMap
, Config
, configMap
, configPath
, load
, Configurable(..)
, (!)
) where
imp... | databrary/databrary | src/Store/Config.hs | agpl-3.0 | 7,023 | 0 | 16 | 1,511 | 2,650 | 1,399 | 1,251 | -1 | -1 |
module View.Html
( unsafeBuilder
, lazyByteStringHtml
, byteStringHtml
, byteStringValue
, builderValue
, actionLink
, Query
, actionValue
, actionForm
, (!?)
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Builder as BSB
import qualified Data.ByteString.Lazy as B... | databrary/databrary | src/View/Html.hs | agpl-3.0 | 2,389 | 0 | 12 | 334 | 661 | 367 | 294 | 50 | 1 |
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import Triangle (TriangleType(..), triangleType)
exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else Exit... | mscoutermarsh/exercism_coveralls | assignments/haskell/triangle/triangle_test.hs | agpl-3.0 | 846 | 0 | 12 | 177 | 337 | 179 | 158 | 23 | 2 |
-- Copyright (C) 2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library i... | dashea/bdcs | importer/BDCS/Depsolve.hs | lgpl-2.1 | 12,771 | 0 | 20 | 3,467 | 2,095 | 1,130 | 965 | 120 | 21 |
-- Copyright 2016 TensorFlow authors.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agree... | tensorflow/haskell | tensorflow-ops/src/TensorFlow/Ops.hs | apache-2.0 | 14,131 | 1 | 15 | 3,589 | 3,276 | 1,783 | 1,493 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DeriveDataTypeable #-}
module SharedTypes where
import Prelude
import Data.Data
import Fay.Yesod
data Command = GetFib Int (Returns Int)
deriving (Typeable, Data)
| Reyu/CanidComics | fay-shared/SharedTypes.hs | apache-2.0 | 218 | 0 | 8 | 34 | 47 | 28 | 19 | 8 | 0 |
module S3E3 where
import FPPrac.Trees
data Tree1a = Leaf1a Int
| Node1a Int Tree1a Tree1a
data Tree1d = Leaf1d (Int, Int)
| Node1d [Tree1d]
pp1d :: Tree1d -> RoseTree
pp1d (Leaf1d l) = RoseNode (show l) []
pp1d (Node1d ts) = RoseNode "" (map pp1d ts)
-- Exercise 3a
binMirror :: Tree1a -> Tr... | wouwouwou/module_8 | src/main/haskell/series3/exercise3.hs | apache-2.0 | 736 | 0 | 11 | 154 | 338 | 180 | 158 | 17 | 1 |
data Tree a = Node a (Tree a) (Tree a)
| Empty
deriving (Show)
simpleTree :: Tree String
simpleTree = Node "parent" (Node "left child" Empty Empty)
(Node "right child" Empty Empty)
| EricYT/real-world | src/chapter-3/Tree.hs | apache-2.0 | 237 | 0 | 8 | 88 | 77 | 40 | 37 | 6 | 1 |
{-# LANGUAGE AllowAmbiguousTypes
, DataKinds
, FlexibleInstances
, KindSignatures
, MultiParamTypeClasses
, ScopedTypeVariables
, TypeApplications
#-}
-----------------------------------------------------------------------------
-- |
-- Module : ... | sdiehl/ghc | libraries/base/GHC/OverloadedLabels.hs | bsd-3-clause | 1,826 | 0 | 7 | 342 | 83 | 64 | 19 | 12 | 0 |
-- Example of number-parameterized types
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module NumberParamterizedTypes
(
RNat
, (/)
) where
import Da... | notae/haskell-exercise | NumberParameterizedTypes.hs | bsd-3-clause | 1,565 | 1 | 13 | 387 | 440 | 251 | 189 | 29 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
-----------------------------------------------------------------------------
-- |
-- Module : LGtk.Demos.PlotDemo.Main
-- Copyright : (c) Daniel Pek 2014
-- License : see LICENSE
--
-- Maintainer : pekdaniel@gmail.com
--
-- Contains the entry point 'main', bu... | pdani/lgtk-plot-demo | src/LGtk/Demos/PlotDemo/Main.hs | bsd-3-clause | 2,156 | 0 | 20 | 754 | 518 | 283 | 235 | -1 | -1 |
module Data.Function.Instances.Algebra.Monoid where
import Data.Function.Instances.Algebra.Internal
import Algebra.Monoid as M
instance C a => C (k -> a) where
idt = const M.idt
(<*>) = zipFn (M.<*>)
cumulate fs = \x -> M.cumulate $ map ($ x) fs
| TobBrandt/function-instances-algebra | Data/Function/Instances/Algebra/Monoid.hs | bsd-3-clause | 254 | 0 | 9 | 45 | 98 | 58 | 40 | 7 | 0 |
{-|
Free monads build syntax trees. See the example sections for details.
A free monad over a functor resembles a list of that functor:
* 'return' behaves like @[]@ by not using the functor at all
* 'wrap' behaves like @(:)@ by prepending another layer of the functor
* 'liftF' behaves like @sin... | Gabriel439/Haskell-Transformers-Free-Library | Control/Monad/Trans/Free.hs | bsd-3-clause | 6,613 | 0 | 15 | 1,868 | 558 | 310 | 248 | 37 | 1 |
{-# LANGUAGE OverloadedStrings, LambdaCase, RecordWildCards #-}
module Web.RTBBidder (bidderApp) where
import qualified Network.Wai as WAI
import Control.Exception (bracket_)
import qualified Web.RTBBidder.Types as WRB
bidderApp :: WRB.RTBProtocol -> WRB.Bidder -> WAI.Application
bidderApp WRB.RTBProtocol{..} bidder h... | hiratara/hs-rtb-bidder | src/Web/RTBBidder.hs | bsd-3-clause | 633 | 0 | 15 | 129 | 184 | 94 | 90 | 15 | 2 |
module FilterByRegex
where
import ChunkedFileProcessing
import qualified Data.ByteString.Lazy.Char8 as LB
import qualified Data.ByteString.Char8 as B
import Data.List (foldl')
import Text.Regex.PCRE.Light (compile, match, Regex)
import Control.Monad (forM)
import Control.Parallel.Strategies (NFData(..), rwhnf)
import ... | marcmo/filtering | FilterByRegex.hs | bsd-3-clause | 1,631 | 37 | 12 | 422 | 533 | 288 | 245 | 36 | 3 |
{-# LANGUAGE QuasiQuotes #-}
-- # LANGUAGE OverloadedStrings #
module Main (
main
) where
import Control.Applicative ((<$>))
import Control.Monad.Trans (liftIO)
import GHCJS.DOM
(enableInspector, webViewGetDomDocument, runWebGUI)
import GHCJS.DOM.Document (documentGetBody, documentGetHead, documentCreateEl... | KevinCotrone/testing-ghcjs | src/Main.hs | bsd-3-clause | 7,664 | 0 | 20 | 1,706 | 890 | 497 | 393 | 69 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE ScopedTypeVariables #-}
{... | manyoo/reflex-dom | src/Reflex/Dom/Widget/Input.hs | bsd-3-clause | 22,415 | 0 | 25 | 4,975 | 5,569 | 2,908 | 2,661 | -1 | -1 |
{-# LANGUAGE CPP #-}
-- #define DEBUG
{-|
Module : AERN2.Poly.Cheb.Tests
Description : Tests for Chebyshev-basis polynomials
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portable
Tests for Ch... | michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/PPoly/Tests.hs | bsd-3-clause | 12,389 | 0 | 20 | 2,534 | 3,203 | 1,703 | 1,500 | -1 | -1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE OverloadedStrings #-}
module Develop.Generate.Help
( makeHtml
, makeCodeHtml
, makeElmHtml
)
where
import Text.Blaze.Html5 ((!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import qualified Develop.StaticFiles as StaticFiles... | evancz/cli | src/Develop/Generate/Help.hs | bsd-3-clause | 2,893 | 0 | 18 | 691 | 762 | 385 | 377 | 77 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Dimensions.DE
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :: [Se... | facebookincubator/duckling | Duckling/Dimensions/DE.hs | bsd-3-clause | 454 | 0 | 6 | 90 | 75 | 44 | 31 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
module Game.Monsters.MFlyer where
import Control.Lens (use, preuse, ix, zoom, (^.), (.=), (%=), (&), (.~), (%~))
import Control.Monad (when, unless, liftM, void)
import Data.Bits ((.&.))
import Data.Char (toLower)
import Linear (V3(..), _x, _z)
import qual... | ksaveljev/hake-2 | src/Game/Monsters/MFlyer.hs | bsd-3-clause | 31,283 | 0 | 47 | 9,114 | 8,830 | 4,483 | 4,347 | -1 | -1 |
{-|
Module : BPlusTree.Node
Description : Node module for B+ Tree
License : BSD3
Maintainer : 2020saurav@gmail.com
Stability : experimental
This module provides data type 'Node' which corresponds to a node in a B+ tree.
A node contains information about the number of keys, list of keys, list of
values and ... | proneetv/ariaDB | src/Service/BPlusTree/Node.hs | bsd-3-clause | 1,573 | 0 | 13 | 358 | 213 | 121 | 92 | 19 | 1 |
module Language.ImProve.Path
( totalPaths
) where
import Language.ImProve.Core
totalPaths :: Name -> Statement -> IO ()
totalPaths name stmt = do
putStrLn $ "total paths: " ++ show (paths stmt)
writeFile (name ++ ".dot") (dot stmt)
paths :: Statement -> Integer
paths a = case a of
Assign _ _ -> 1
Br... | tomahawkins/improve | Language/ImProve/Path.hs | bsd-3-clause | 1,123 | 0 | 13 | 354 | 575 | 295 | 280 | 31 | 7 |
{-# LANGUAGE PatternGuards, ViewPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
module Narradar.Processor.UsableRules where
import Narradar.Framework
import Narradar.Framework.Ppr
data UsableRulesProof = UsableRulesProof deriving (Eq,Show,Ord)
instan... | pepeiborra/narradar | src/Narradar/Processor/UsableRules.hs | bsd-3-clause | 787 | 0 | 6 | 122 | 64 | 38 | 26 | 9 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverlappingInstances #-}
module Text.Syntax.Printer.Text
( Printer ()
, print
, print'
, runAsPrinter
, runAsPrinter'
) where
import Prelude hiding (print)
import Contro... | schernichkin/exchange | src/Text/Syntax/Printer/Text.hs | bsd-3-clause | 1,793 | 0 | 11 | 427 | 578 | 306 | 272 | 47 | 2 |
-- |
-- Module : Crypto.Hash.SHA512
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- module containing the binding functions to work with the
-- SHA512 cryptographic hash.
--
{-# LANGUAGE ForeignFunctionInterface #-}
module... | nomeata/cryptonite | Crypto/Hash/SHA512.hs | bsd-3-clause | 1,192 | 0 | 10 | 271 | 236 | 132 | 104 | 20 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module HaskellCI.Config where
import HaskellCI.Prelude
import Distribution.Simple.Ut... | hvr/multi-ghc-travis | src/HaskellCI/Config.hs | bsd-3-clause | 17,538 | 0 | 106 | 5,659 | 3,313 | 1,687 | 1,626 | -1 | -1 |
{-# language CPP #-}
-- | = Name
--
-- VK_GOOGLE_hlsl_functionality1 - device extension
--
-- == VK_GOOGLE_hlsl_functionality1
--
-- [__Name String__]
-- @VK_GOOGLE_hlsl_functionality1@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 224
--
-- [__Revision__]
-- ... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_GOOGLE_hlsl_functionality1.hs | bsd-3-clause | 3,742 | 0 | 8 | 769 | 218 | 160 | 58 | -1 | -1 |
import Plots
import Plots.Types hiding (B)
import Plots.Types.Function
import Plots.Axis
import Diagrams.Prelude
import Diagrams.Coordinates.Polar
import Diagrams.Backend.Rasterific
myaxis :: Axis B Polar Double
myaxis = polarAxis &~ do
addPlotable $
mkParametricPlot (\t -> mkPolar t (t @@ rad))
& paramet... | bergey/plots | examples/polar.hs | bsd-3-clause | 461 | 0 | 17 | 79 | 151 | 81 | 70 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
module Text.Formattable where
import qualified Data.Text as T
class Formattable f where
pack :: T.Text -> f
unpack :: f -> T.Text
instance Formattable T.Text where
pack = id
unpack = id
instance Formattable Int where
pack = read . T.unpack
unpack = T.pack . show
ins... | myuon/FuncFormat | Text/Formattable.hs | bsd-3-clause | 640 | 0 | 8 | 141 | 208 | 114 | 94 | 24 | 0 |
module HW5.ExprT where
data ExprT = Lit Integer
| Add ExprT ExprT
| Mul ExprT ExprT
deriving (Show, Eq)
| cgag/cis-194-solutions | src/HW5/ExprT.hs | bsd-3-clause | 129 | 0 | 6 | 44 | 40 | 23 | 17 | 5 | 0 |
module Network.AMQP.MessageBus
( Exchange (..)
, ExchangeName (..)
, Message (..)
, MessageHandler (..)
, Queue (..)
, QueueName (..)
, QueueStatus (..)
, TopicName (..)
, WithConn (..)
, ackEnvelope
, createExchange
, deleteExchange
, createQueue
, deleteQueue
, getTopicMessages
, produceTopicMessage
, subscribe
, wit... | gust/feature-creature | legacy/lib/Network/AMQP/MessageBus.hs | mit | 486 | 0 | 5 | 58 | 127 | 89 | 38 | 23 | 0 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (foldM, when)
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C
import Data.IntMap.Strict (IntMap)
import qualified Data.IntMap.Strict as IntMap
import Data.List (foldl', intersperse)
import Dat... | dmit/slct-hs | slct.hs | gpl-2.0 | 2,931 | 6 | 25 | 700 | 932 | 486 | 446 | 62 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CreateNetworkInterface.hs | mpl-2.0 | 7,555 | 0 | 10 | 1,677 | 855 | 517 | 338 | 95 | 1 |
module TestLexer (testLexer) where
import Test.HUnit
import Lexer
checkToken :: String -> (TokenType -> Bool) -> Test
checkToken s f = TestLabel ("test token \"" ++ s ++ "\"") $ TestCase $ do
let tokens = alexScanTokens s
length tokens @?= 1
f (tokenType . head $ tokens) @? ""
checkTokenList :: String -... | ademinn/JavaWithClasses | test/src/TestLexer.hs | bsd-3-clause | 2,961 | 0 | 13 | 934 | 885 | 481 | 404 | 103 | 1 |
-- |
-- Utility functions.
--
module Utility (
alternate
, bin
, equating
, exitBecause
, logStr
, logStrLn
, pad
, pleat
, trimBins
) where
import Data.Ord (comparing)
import Data.List (sort, sortBy, groupBy)
import System.Exit (exitFailure)
import System.IO (hPutStr, hPutStrLn, stderr)
-- | P... | b4winckler/up-down-signature | src/sigscore/Utility.hs | bsd-3-clause | 2,085 | 0 | 11 | 507 | 599 | 328 | 271 | 40 | 1 |
{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ord
-- Copyright : (c) The University of Glasgow 2005
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- St... | alekar/hugs | packages/base/Data/Ord.hs | bsd-3-clause | 885 | 0 | 8 | 161 | 116 | 76 | 40 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Stack.Options
(BuildCommand(..)
,GlobalOptsContext(..)
,benchOptsParser
,buildOptsParser
,cleanOptsParser
,configCmdSetParser
,configOptsParser
,dockerOptsParser
,dockerCleanupOptsParser
,dotOptsParser
... | Heather/stack | src/Stack/Options.hs | bsd-3-clause | 37,958 | 0 | 33 | 14,400 | 6,621 | 3,293 | 3,328 | 884 | 9 |
{-#LANGUAGE OverloadedStrings #-}
{-#LANGUAGE QuasiQuotes #-}
{-#LANGUAGE NoImplicitPrelude #-}
module Web.Sprinkles.ApplicationTest
where
import Web.Sprinkles.Prelude
import Web.Sprinkles.Project (Project (..), loadProject)
import Web.Sprinkles.ServerConfig (ServerConfig (..))
import Web.Sprinkles.Serve (appFromProje... | tdammers/templar | test/Web/Sprinkles/ApplicationTest.hs | bsd-3-clause | 2,467 | 0 | 16 | 679 | 581 | 305 | 276 | 57 | 1 |
-- |
-- Module : Data.Primitive.Internal.Compat
-- Copyright : (c) Roman Leshchinskiy 2011-2012
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Portability : non-portable
--
-- Compatibility functions
--
module Data.Primitive.Internal.Compat (mkNoRepType) where
#if MI... | rleshchinskiy/primitive | Data/Primitive/Internal/Compat.hs | bsd-3-clause | 445 | 0 | 5 | 67 | 36 | 28 | 8 | 3 | 1 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/Text/Lazy/Read.hs" #-}
{-# LANGUAGE OverloadedStrings, CPP #-}
{-# LANGUAGE Safe #-}
-- |
-- Module : Data.Text.Lazy.Read
-- Copyright : (c) 2010, 2011 Bryan O'Sullivan
--
-- License : BSD-style
-- Ma... | phischu/fragnix | tests/packages/scotty/Data.Text.Lazy.Read.hs | bsd-3-clause | 7,321 | 0 | 19 | 1,700 | 1,246 | 682 | 564 | 109 | 5 |
--
-- The Computer Language Benchmarks Game
-- http://benchmarksgame.alioth.debian.org/
--
-- Contributed by Don Stewart
-- Parallelized by Louis Wasserman
{-#LANGUAGE BangPatterns #-}
import System.Environment
import Control.Monad
import System.Mem
import Data.Bits
import Text.Printf
--
-- an artificially strict tr... | agocorona/transient | tests/Test2.hs | mit | 1,904 | 2 | 13 | 515 | 720 | 378 | 342 | 47 | 2 |
#!/usr/bin/env runhaskell
import Data.Char (isDigit)
import Data.List (intercalate)
import Data.Monoid ((<>))
import Data.Version (showVersion)
import Distribution.PackageDescription
import Distribution.Verbosity
import Distribution.Simple
import ... | charleso/bantam | framework/Setup.hs | unlicense | 3,111 | 0 | 16 | 761 | 903 | 471 | 432 | 66 | 3 |
{- misc utility functions
-
- Copyright 2010-2011 Joey Hess <joey@kitenet.net>
-
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.Misc where
import System.IO
import Control.Monad
import Foreign
import Data.Char
import Data.List
import Control.Applicative
import System.Exit
#ifndef mingw32_HOST_OS
... | avengerpenguin/propellor | src/Utility/Misc.hs | bsd-2-clause | 4,502 | 6 | 12 | 895 | 1,184 | 618 | 566 | 70 | 3 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-2012
Note [Unarisation]
~~~~~~~~~~~~~~~~~~
The idea of this pass is to translate away *all* unboxed-tuple binders. So for example:
f (x :: (# Int, Bool #)) = f x + f (# 1, True #)
==>
f (x1 :: Int) (x2 :: Bool) = f x1 x2 + f 1 True
It is important that we do... | forked-upstream-packages-for-ghcjs/ghc | compiler/simplStg/UnariseStg.hs | bsd-3-clause | 8,000 | 0 | 13 | 1,695 | 2,493 | 1,295 | 1,198 | 132 | 3 |
-----------------------------------------------------------------------------
--
-- Pretty-printing TyThings
--
-- (c) The GHC Team 2005
--
-----------------------------------------------------------------------------
{-# LANGUAGE CPP #-}
module PprTyThing (
pprTyThing,
pprTyThingInContext,
ppr... | ezyang/ghc | compiler/main/PprTyThing.hs | bsd-3-clause | 6,519 | 0 | 16 | 1,382 | 869 | 480 | 389 | 76 | 4 |
module WhileM where
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--short-names" @-}
import RIO
{-@
whileM :: forall < p :: World -> Prop
, qc :: World -> Bool -> World -> Prop
, qe :: World -> () -> World -> Prop
, q :: World -> () -> World -> Prop>.
{x::()... | ssaavedra/liquidhaskell | benchmarks/icfp15/todo/WhileM.hs | bsd-3-clause | 933 | 0 | 18 | 303 | 150 | 82 | 68 | 8 | 2 |
-- These two declarations get their derived instances
-- in two different ways
module ShouldCompile where
newtype Bar = Bar Int deriving Eq
data Baz = Baz Bar deriving Eq
| urbanslug/ghc | testsuite/tests/typecheck/should_compile/tc143.hs | bsd-3-clause | 176 | 0 | 6 | 35 | 29 | 19 | 10 | 3 | 0 |
{-# OPTIONS_GHC -O -ddump-rules #-}
-- Trac #2486
--
-- The thing to look for here is that specialisations for fib and tak
-- at both Int and Double are indeed generated; hence -ddump-rules
module Main where
import System.Environment
import Numeric
main = do
n <- getArgs >>= readIO . head
let m = n-1
... | wxwxwwxxx/ghc | testsuite/tests/simplCore/should_run/T2486.hs | bsd-3-clause | 1,211 | 0 | 16 | 440 | 634 | 331 | 303 | 25 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE BangPatterns #-}
module Main where
import Control.Category
import Criterion.Main
import Data.MyPrelude
import Data.Utils
import Data.Void
import Numeric.Neural
import Prelude hiding (id, (.))
main :: IO ()
main = defaultMain
[ bgroup "white"
[ bench "10... | brunjlar/neural | benchmark/benchmark.hs | mit | 2,561 | 0 | 16 | 755 | 1,056 | 530 | 526 | 60 | 2 |
{-|
Module : Network.Flow.V9.Fields
Description : Field Decoding
Copyright : (c) Jan Dvořák
License : MIT
Maintainer : mordae@mordae.eu
Stability : unstable
Portability : non-portable (ghc)
-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}... | techlib/netflow | lib/Network/Flow/V9/Fields.hs | mit | 31,635 | 0 | 12 | 6,130 | 10,304 | 5,594 | 4,710 | 513 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Debug.NoTrace
-- Copyright : (c) Cindy Wang (CindyLinz) 2013
-- License : MIT
--
-- Maintainer : Cindy Wang (CindyLinz)
-- Stability : provisional
-- Portability : portable
--
-- This module introduce fun... | CindyLinz/Haskell-NoTrace | src/Debug/NoTrace.hs | mit | 1,572 | 0 | 8 | 323 | 367 | 200 | 167 | 27 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.