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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Sound.IoSox
(
createSoxProcess
, independentSox
-- * Input from file
, rvreadfilewav
, rlreadfilewav
, SoxReadFile(..)
-- * Formats
, Wav(..)
, Snd(..)
-- * Format conversion
, conwavau
)
where
import Sound.InfList
import Sound.IoPtr
import Sound.IoFail
import Sound.S... | edom/sound | src/Sound/IoSox.hs | bsd-3-clause | 2,545 | 0 | 18 | 647 | 669 | 361 | 308 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Dhall.Test.Lint where
import Data.Text (Text)
import Dhall.Parser (Header (..))
import Prelude hiding (FilePath)
import Test.Tasty (TestTree)
import Turtle (FilePath)
import qualified Data.Text as Text
import qualified Data.Text.IO ... | Gabriel439/Haskell-Dhall-Library | dhall/tests/Dhall/Test/Lint.hs | bsd-3-clause | 2,096 | 0 | 13 | 518 | 515 | 286 | 229 | 45 | 1 |
-- | Exports relevant functionality of the PiReader.
module Language.Java.Paragon.Monad.PiReader
( -- * Exported functionality
PiPath
, PiReader(..)
, liftToBaseM
, MonadPR(..)
, getPiPath
, doesPkgExist
, doesTypeExist
, getPkgContents
, getPiPathContents
, getTypeContents
) where
import Lan... | bvdelft/paragon | src/Language/Java/Paragon/Monad/PiReader.hs | bsd-3-clause | 413 | 0 | 5 | 67 | 69 | 50 | 19 | 14 | 0 |
module Network.Bitcoin.Haskoin
( transactionOutputAddress
, transactionInputAddress
, getTransaction
, getTransactionOutput
, outpointAddress
, importAddress
, -- * Utility functions
addressToHex
, decodeHexTx
, hexTxHash
, hexToAddress
, transactionIdToTxHash
, -... | WraithM/haskoin-bitcoind | src/Network/Bitcoin/Haskoin.hs | bsd-3-clause | 3,035 | 0 | 11 | 813 | 689 | 380 | 309 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.UI.GLUT.GameMode
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/GLUT/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : stable
-- Portabilit... | FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/Graphics/UI/GLUT/GameMode.hs | bsd-3-clause | 8,827 | 82 | 9 | 1,494 | 1,183 | 684 | 499 | -1 | -1 |
{-# LANGUAGE InstanceSigs #-}
module Builder (
-- * Data types
ArMode (..), CcMode (..), ConfigurationInfo (..), GhcMode (..),
GhcPkgMode (..), HaddockMode (..), SphinxMode (..), TarMode (..),
Builder (..),
-- * Builder properties
builderProvenance, systemBuilderPath, builderPath, isSpecified, ... | sdiehl/ghc | hadrian/src/Builder.hs | bsd-3-clause | 14,711 | 0 | 20 | 4,764 | 2,773 | 1,417 | 1,356 | -1 | -1 |
-- {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Data.List.CommonSubstringSpec where
import Test.Hspec
import Control.Applicative
import qualified Data.ByteString.Char8 as BS
import Control.Monad(forM_)
import qualified Data.List.CommonSubstring as Suffix
import qualified Data.List.SlowSubstring as S... | mwotton/string-similarity | test/Data/List/CommonSubstringSpec.hs | bsd-3-clause | 784 | 0 | 17 | 138 | 185 | 109 | 76 | 16 | 1 |
{-# LANGUAGE Rank2Types #-}
{-|
Parallel stochastic sampling for 'mwc-random' package.
-}
module Control.Parallel.Stochastic
( purifyRandomST
, ParallelSeeds
, parMapST
, splitParMapST
)
where
import Control.Monad.ST
import Control.Parallel.Strategies
import System.Random.MWC
import Data.Spl... | dzhus/dsmc | src/Control/Parallel/Stochastic.hs | bsd-3-clause | 1,763 | 0 | 12 | 473 | 384 | 215 | 169 | 33 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS -Wall #-}
module IterX.Exception (
IterException
,IException(..)
,iExceptionToException
,iExceptionFromException
,TerminateEarly(..)
,isTerminateEarly
,terminateEarlyHandler
,IterFailure(..)
,isIter... | JohnLato/iterx | src/IterX/Exception.hs | bsd-3-clause | 2,219 | 0 | 10 | 405 | 479 | 251 | 228 | 53 | 2 |
-- | Assorted conditions used later on in AI logic.
module Game.LambdaHack.Client.AI.ConditionM
( condAimEnemyTargetedM
, condAimEnemyOrStashM
, condAimEnemyOrRememberedM
, condAimNonEnemyPresentM
, condAimCrucialM
, condTgtNonmovingEnemyM
, condAdjTriggerableM
, meleeThreatDistList
, condBlocksFriend... | LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/AI/ConditionM.hs | bsd-3-clause | 19,507 | 0 | 22 | 4,996 | 4,819 | 2,478 | 2,341 | -1 | -1 |
module Generics.GPAH.Derive.PPrint where
import Generics.GPAH.Derive.Base
import Text.CSV
import System.IO
import qualified Data.Map as M
import Data.Function
import Data.List
pprint :: Analysis -> FilePath -> IO ()
pprint (Analysis a1 a2 a3 a4) fp = do
let p = [["DeriveTemplateHaskellDirectives", show $ sortBy (fl... | bezirg/gpah | src/Generics/GPAH/Derive/PPrint.hs | bsd-3-clause | 831 | 0 | 17 | 224 | 268 | 144 | 124 | 17 | 1 |
import Prelude hiding ((>), (-), (.))
import System.Shana
import System.Shana.Utils
import System.Shana.DSL.Shell
main = shana - ls "." > grep "src" | nfjinjing/shana | src/Main.hs | bsd-3-clause | 151 | 0 | 7 | 23 | 59 | 37 | 22 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | The work is mainly steal from https://gist.github.com/2725402
--
--
module Snap.Snaplet.Auth.Backends.MongoDB where
import Control.Exception (Exception)
import Data.Typeable (Typeable)
import Control.Applicative
import Co... | HaskellCNOrg/snap-web | src/Snap/Snaplet/Auth/Backends/MongoDB.hs | bsd-3-clause | 10,392 | 0 | 44 | 3,307 | 2,572 | 1,319 | 1,253 | 209 | 6 |
module Api (
module Api.Config,
module Api.Monad,
module Api.Routes
) where
import Api.Config
import Api.Monad
import Api.Routes
| raptros/chatless-hs | src/Api.hs | bsd-3-clause | 174 | 0 | 5 | 62 | 39 | 25 | 14 | 7 | 0 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TemplateHaskell #-}
{-# ... | tomberek/RETE | src/RETE/Lib3.hs | bsd-3-clause | 5,582 | 0 | 15 | 1,455 | 2,227 | 1,166 | 1,061 | -1 | -1 |
module T367 where
import Data.Singletons.TH (singletonsOnly)
import Prelude.Singletons
$(singletonsOnly [d|
const' :: a -> b -> a
const' x _ = x
|])
test :: Sing True
test = sConst' @Bool @() STrue STuple0
| goldfirere/singletons | singletons-base/tests/compile-and-dump/Singletons/T367.hs | bsd-3-clause | 215 | 0 | 7 | 43 | 62 | 35 | 27 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Q3Demo.Loader.BSP where
import Control.Applicative
import Control.Monad
import Data.Bits
import Data.Int
import Data.Word
import Data.Binary as B
import Data.Binary.Get as B
import Data.Binary.IEEE754
import Data.Vect hiding (Vector)
import Data.Vector (Vector)
import qualifi... | csabahruska/q3demo | src/Q3Demo/Loader/BSP.hs | bsd-3-clause | 8,897 | 0 | 22 | 2,585 | 2,246 | 1,239 | 1,007 | 221 | 5 |
{-|
Module : Export.PdfGenerator
Description : Contains functions for generating a PDF from LaTeX text.
-}
module Export.PdfGenerator
(createPDF) where
import System.Process (createProcess, shell, waitForProcess, ProcessHandle)
import GHC.IO.Handle.Types
import Export.ImageConversion (removeFile)
impo... | hermish/courseography | app/Export/PdfGenerator.hs | gpl-3.0 | 1,368 | 0 | 13 | 346 | 240 | 128 | 112 | 22 | 1 |
module Model.Role.Internal where
import Prelude
import Data.Text as T
import Database.Persist.TH
import Debug.Trace
import Web.PathPieces
data Role
= TeamMember
| Moderator
| Admin
deriving (Bounded, Enum, Eq, Show, Read, Ord)
derivePersistField "Role"
instance PathPiece Role where
fromPathPiec... | chreekat/snowdrift | Model/Role/Internal.hs | agpl-3.0 | 435 | 0 | 11 | 95 | 141 | 77 | 64 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Tholos.API.ContentTypes where
import Data.Aeson
import Data.Aeson.Parser
import Data.Aeson.Types (parseEither)
impo... | charlescrain/tholos | src/Tholos/API/ContentTypes.hs | bsd-3-clause | 1,157 | 0 | 11 | 282 | 258 | 148 | 110 | -1 | -1 |
module Language.Embedded.Hardware.Expression
( HExp
, HType
, Bit
, Bits
, bitFromInteger
, bitToInteger
, module Language.Embedded.Hardware.Expression.Frontend
) where
import Language.Embedded.Hardware.Expression.Syntax (HExp, HType)
import Language.Embedded.Hardware.Expression.Frontend
import Languag... | markus-git/imperative-edsl-vhdl | src/Language/Embedded/Hardware/Expression.hs | bsd-3-clause | 468 | 0 | 5 | 51 | 96 | 68 | 28 | 12 | 0 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
module Unify (
tcMatchTy, tcMatchTys, tcMatchTyX, tcMatchTysX, tcUnifyTyWithTFs,
ruleMatchTyX,
-- * Rough matching
roughMatchTcs, instanceCantMatch,
t... | nushio3/ghc | compiler/types/Unify.hs | bsd-3-clause | 47,697 | 301 | 19 | 13,932 | 7,010 | 3,842 | 3,168 | 551 | 9 |
module Test003 where
import qualified Data.Text as T
import Kask.Print
import Prelude hiding (print)
test1 :: String
test1 = toString $ do
print ("aaa" :: String)
printLn $ show (127 :: Int)
printLn ("ąęśćółżźń" :: T.Text)
test2 :: ShowS
test2 = toShowS $ do
print ("bbb" :: String)
prin... | kongra/kask-base | app/Test003.hs | bsd-3-clause | 776 | 0 | 10 | 204 | 295 | 153 | 142 | 30 | 1 |
module System.Console.Haskeline.Key(Key(..),
Modifier(..),
BaseKey(..),
noModifier,
simpleKey,
simpleChar,
metaChar,
ctrlChar,
metaKey,
ctrlKey,
parseKey
) where
import Data.Bits
import D... | judah/haskeline | System/Console/Haskeline/Key.hs | bsd-3-clause | 4,976 | 0 | 13 | 1,563 | 1,595 | 858 | 737 | 133 | 5 |
module Blockchain.BlockSynchronizer (
handleNewBlockHashes,
handleNewBlocks
) where
import Control.Monad.IO.Class
import Control.Monad.State
import qualified Data.Binary as Bin
import qualified Data.ByteString as B
import qualified Data.Byte... | jamshidh/ethereum-vm | src/Blockchain/BlockSynchronizer.hs | bsd-3-clause | 4,188 | 0 | 20 | 895 | 1,023 | 526 | 497 | -1 | -1 |
module NPDA.Vorganger
-- $Id$
( vorganger
, vorganger_konfigurationen -- brauchen wir nicht?
)
where
import NPDA.Type
import NPDA.Konfiguration
import Control.Monad (guard)
import Autolib.Schichten
vorganger :: NPDAC x y z
=> NPDA x y z -> Set (Konfiguration x y z)
-> [ Konfiguration x y z ]
vorgange... | Erdwolf/autotool-bonn | src/NPDA/Vorganger.hs | gpl-2.0 | 948 | 12 | 14 | 274 | 384 | 198 | 186 | 27 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnBinds]{Renaming and dependency analysis of bindings}
This module does renaming and dependency analysis on value bindings in
the abstract syntax. It does {\em not} do cycle-checks on class or
type-synonym declarations; those cannot be done at thi... | forked-upstream-packages-for-ghcjs/ghc | compiler/rename/RnBinds.hs | bsd-3-clause | 46,352 | 0 | 23 | 13,860 | 9,062 | 4,790 | 4,272 | 544 | 20 |
module Main where
import System.Plugins
main = do
makeAll "A.hs" []
y <- load "A.o" ["."] [] "u"
case y of
LoadSuccess _ _ -> putStrLn $ "YES"
LoadFailure e -> mapM_ putStrLn e
| abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/testsuite/hier/hier4/Main.hs | bsd-3-clause | 211 | 0 | 10 | 68 | 81 | 39 | 42 | 8 | 2 |
module HW05.StackVM (StackVal(..), StackExp(..), Stack, Program, stackVM) where
-- Values that may appear in the stack. Such a value will also be
-- returned by the stackVM program execution function.
data StackVal = IVal Integer | BVal Bool | Void deriving Show
-- The various expressions our VM understands.
data Sta... | boojinks/cis194-solutions | src/HW05/StackVM.hs | bsd-3-clause | 2,218 | 0 | 9 | 748 | 802 | 421 | 381 | 39 | 1 |
module Haskell.Warnings (spam, main)
where
spam eggs = map lines eggs
main :: IO ()
main = (putStrLn "hello world")
| flycheck/flycheck | test/resources/language/haskell/Warnings.hs | gpl-3.0 | 118 | 0 | 6 | 22 | 48 | 26 | 22 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module KAT_Camellia (tests) where
import Imports ()
import BlockCipher
import qualified Data.ByteString as B
import Crypto.Cipher.Camellia
vectors_camellia128 =
... | nomeata/cryptonite | tests/KAT_Camellia.hs | bsd-3-clause | 1,791 | 0 | 9 | 198 | 798 | 506 | 292 | 24 | 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="it-IT">
<title>Report Generation</title>
<maps>
<homeID>reports</homeID>
<mapref locati... | thc202/zap-extensions | addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 966 | 98 | 29 | 156 | 395 | 209 | 186 | -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="fil-PH">
<title>Ang Browser na tanawin | Extension ng ZAP</title>
<maps>
<homeID>top</homeID... | thc202/zap-extensions | addOns/browserView/src/main/javahelp/org/zaproxy/zap/extension/browserView/resources/help_fil_PH/helpset_fil_PH.hs | apache-2.0 | 1,004 | 95 | 29 | 166 | 416 | 218 | 198 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.Analysis.Syntax
-- Copyright : (c) 2008 Benedikt Huber
-- License : BSD-style
-- Maintainer : benedikt.huber@gmail.com
-- Stability : alpha
-- Portability : ... | wdanilo/haskell-language-c | src/Language/C/Analysis/SemRep.hs | bsd-3-clause | 23,110 | 0 | 12 | 5,284 | 4,897 | 2,707 | 2,190 | 375 | 6 |
{-# OPTIONS_GHC -fwarn-unsafe #-}
module SH_Overlap11_B (
C(..)
) where
class C a where
f :: a -> String
| urbanslug/ghc | testsuite/tests/safeHaskell/overlapping/SH_Overlap11_B.hs | bsd-3-clause | 115 | 0 | 7 | 29 | 32 | 19 | 13 | 5 | 0 |
{-# OPTIONS_GHC -fwarn-unsafe #-}
{-# LANGUAGE FlexibleInstances #-}
-- | Same as `SH_Overlap6`, but now we are inferring safety. Should be inferred
-- unsafe due to overlapping instances at call site `f`.
--
-- Testing that we are given correct reason.
module SH_Overlap11 where
import SH_Overlap11_A
instance
C [a... | urbanslug/ghc | testsuite/tests/safeHaskell/overlapping/SH_Overlap11.hs | bsd-3-clause | 391 | 0 | 7 | 74 | 66 | 42 | 24 | 9 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
module Data.Sequence.RightPerfect where
import Numeric.Peano
import Data.Kind
import Control.Applicative
import Data.Bits
import Data.Functor.Identity
import Data.Traversable
import Data.Coerce.Utils
{-# ANN module "HLint: ignore Avoid lambda" #-}... | oisdk/Square | src/Data/Sequence/RightPerfect.hs | mit | 4,209 | 0 | 15 | 1,097 | 1,868 | 951 | 917 | -1 | -1 |
-- Problem 24
--
-- A permutation is an ordered arrangement of objects. For example, 3124 is
-- one possible permutation of the digits 1, 2, 3 and 4. If all of the
-- permutations are listed numerically or alphabetically, we call it
-- lexicographic order. The lexicographic permutations of 0, 1 and 2 are:
--
-- 012 0... | RossMeikleham/Project-Euler-Haskell | 24.hs | mit | 525 | 1 | 8 | 108 | 39 | 24 | 15 | 2 | 1 |
{-# LANGUAGE CPP, DataKinds, FlexibleInstances, MultiParamTypeClasses, TypeFamilies, RecordWildCards, OverloadedStrings, TemplateHaskell, TypeOperators #-}
module Main where
import Control.Applicative
import Control.Monad
import Control.Monad.Trans.Either
import Control.Monad.R... | pkamenarsky/usercfg | server/src/Main.hs | mit | 6,756 | 0 | 24 | 2,354 | 1,900 | 960 | 940 | 135 | 3 |
module Y2016.D01Spec (spec) where
import Y2016
import Test.Hspec
spec :: Spec
spec = parallel $ do
describe "Day 1" $ do
describe "blockDistance" $ do
it "counts a simple case" $
blockDistance "R2, L3" `shouldBe` 5
it "counts looping routes" $
block... | tylerjl/adventofcode | test/Y2016/D01Spec.hs | mit | 598 | 0 | 16 | 212 | 142 | 69 | 73 | 16 | 1 |
import Control.Monad
import Data.Array.IO
import Data.Array
import Data.Array.Base (unsafeThaw, thaw)
import Data.List
-- convert element string into a tuple of int and string values
readElement e = (n, s)
where
arr = words e
n = read (head arr) :: Int
s = last arr
-- 99 is the max int inp... | mgrebenets/hackerrank | alg/arr-n-srt/the-full-counting-sort.hs | mit | 5,796 | 5 | 17 | 1,393 | 923 | 481 | 442 | 56 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SVGPathSegCurvetoCubicRel
(setX, getX, setY, getY, setX1, getX1, setY1, getY1, setX2, getX2,
setY2, getY2... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGPathSegCurvetoCubicRel.hs | mit | 4,363 | 0 | 12 | 509 | 1,024 | 580 | 444 | 50 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Mezzo.Render.MIDI
-- Description : MIDI exporting
-- Copyright : (c) Dima Szamozvancev
-- License : MIT
--
-- Maintainer : ds709@cam.ac.uk
-- Stability : experimental
... | DimaSamoz/mezzo | src/Mezzo/Render/MIDI.hs | mit | 6,140 | 4 | 15 | 1,246 | 1,615 | 903 | 712 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fde... | jbearer/hspl | test/UnificationTest.hs | mit | 43,686 | 0 | 30 | 12,335 | 17,438 | 8,607 | 8,831 | -1 | -1 |
bmiTell :: Double -> String
bmiTell bmi
| bmi <= 18.5 = "You're underweight, you emo, you!"
| bmi <= 25.0 = "You're supposedly normal. Pffft, I bet you're ugly!"
| bmi <= 30.0 = "You're fat! Lose some weight, fatty!"
| otherwise = "You're a whale, congratulations!"
| v0lkan/learning-haskell | session-003/010-bmi-switch.hs | mit | 282 | 1 | 8 | 64 | 70 | 32 | 38 | 6 | 1 |
module Data.Encrypted.Internal where
import Data.Aeson
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text.Encoding as TE
import Data.ByteString (ByteString)
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Base64 as B64
import Control.Error
-- | Str... | tel/enc | src/Data/Encrypted/Internal.hs | mit | 687 | 0 | 7 | 121 | 187 | 109 | 78 | 17 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.HTMLTitleElement (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.HTMLTitleElement
#else
module Graphics.UI.Gtk.WebKit.DOM.HTMLTitleElement
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIP... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/HTMLTitleElement.hs | mit | 465 | 0 | 5 | 39 | 33 | 26 | 7 | 4 | 0 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
module Book where
import GHC.Generics
import Data.Aeson
import Data.Text (Text)
import Data.Monoid
import qualified Data.Text as T
instance Ord Book where
b1@(Book a t _ _) `compare` b2@(Book a2 t2 _ _) = a2 `compare`... | tippenein/bookshelf | src/Book.hs | mit | 584 | 0 | 9 | 117 | 202 | 118 | 84 | 22 | 0 |
import Test.QuickCheck
import Data.List
-- testing whether idempotence property is true
prop_Idempotent :: Ord a => [a] -> Bool
prop_Idempotent xs = sort (sort xs) == sort xs
main :: IO ()
main = quickCheck(prop_Idempotent :: [Int] -> Bool) -- we need to specify concrete element type.
... | calvinchengx/learnhaskell | quickcheck/prop_indempotent.hs | mit | 462 | 0 | 8 | 171 | 94 | 49 | 45 | 6 | 1 |
module SlidingPuzzle (solveSlidingPuzzle) where
import Data.Vector (Vector, (!), (//))
import qualified Data.Vector as V
import Data.Maybe (fromJust, mapMaybe)
import Data.List (elemIndex)
import qualified Data.Set as S
import Control.Monad.Reader
import Control.Monad.State.Lazy
-- | Generalizing this solution for di... | ksaveljev/sliding-puzzle | SlidingPuzzle.hs | mit | 8,260 | 0 | 24 | 1,985 | 1,792 | 972 | 820 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable, OverlappingInstances #-}
{-# LANGUAGE NoMonomorphismRestriction, DeriveDataTypeable #-}
module Control.SQL
( squery, query, logged, reed
, myconnect, collectRows, disconnect
, Statement, getFieldValue, getFieldValueMB, getFieldsTypes
, Query (..), Action (..), Modifier (..)
, Id (.... | Erdwolf/autotool-bonn | src/Control/SQL.hs | gpl-2.0 | 8,343 | 20 | 18 | 2,192 | 2,635 | 1,358 | 1,277 | 181 | 2 |
import UCI
import OpenBookModule
main :: IO ()
main = uci movesArray | adityashah30/haskellchess | chessEngine/Main.hs | gpl-2.0 | 69 | 0 | 7 | 12 | 31 | 14 | 17 | 4 | 1 |
predecessor = predecessor
-- comment 0
-- |comment 1
successor :: a
successor = successor
| evolutics/haskell-formatter | testsuite/resources/source/comments/depends_on_displacement/single_annotation/line_pair/none_before/Output.hs | gpl-3.0 | 91 | 1 | 6 | 16 | 27 | 12 | 15 | 3 | 1 |
module Runtime
(RuntimeAst(..),RuntimeType(..),RuntimeFunc(..),
Compile,SourcePos,compileError,
AstType(..),AstFuncSig(..),
astTypeName,astTypeSize,astTypeImportSize,
astTypeErrorName,astTypeSourcePos,astTypeIsImport,
annotateRuntime)
where
import Compile(Compile,SourcePos,compileError)
im... | qpliu/esolang | blo/hs/Runtime.hs | gpl-3.0 | 1,451 | 0 | 12 | 280 | 441 | 242 | 199 | 35 | 2 |
#!/usr/bin/env runhaskell
--
-- Copyright 2014 Wesley Tanaka <http://wtanaka.com/>
--
-- This file is part of https://github.com/wtanaka/haskell
--
-- https://github.com/wtanaka/haskell is free software: you can
-- redistribute it and/or modify it under the terms of the GNU General
-- Public License as published by the... | wtanaka/haskell | Mem1.hs | gpl-3.0 | 1,114 | 3 | 8 | 186 | 81 | 50 | 31 | 4 | 1 |
{-|
A 'Posting' represents a 'MixedAmount' being added to or subtracted from a
single 'Account'. Each 'Transaction' contains two or more postings which
should add up to 0. Postings also reference their parent transaction, so
we can get a date or description for a posting (from the transaction).
Strictly speaking, \"e... | trygvis/hledger | hledger-lib/Hledger/Data/Posting.hs | gpl-3.0 | 4,052 | 0 | 14 | 834 | 1,007 | 542 | 465 | 68 | 5 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Handler.UserById where
import Import
$(deriveJSON defaultOptions ''User)
getUserByIdR :: String -> Handler Value
getUserByIdR uId = runDB (selectFirst [UserIdent ==. (pack uId)] []) >>= returnJson
getFinishUserR :: String -> String -> String -> Handler Value
getFinishUse... | weshack/thelist | TheList/Handler/UserById.hs | gpl-3.0 | 604 | 0 | 13 | 102 | 219 | 110 | 109 | -1 | -1 |
module NLP.Grabber.Download where
import Control.Monad.Trans
import Control.Monad.Trans.Maybe
import Data.Tree.NTree.TypeDefs
import Network.HTTP
import Network.URI
import Text.XML.HXT.Core
import Text.XML.HXT.HTTP
import Data.Text (Text)
import qualified Data... | azapps/nlp.hs | src/NLP/Grabber/Download.hs | gpl-3.0 | 972 | 0 | 16 | 280 | 282 | 151 | 131 | 27 | 2 |
-- | Round 1A 2010 Problem A. Rotate
-- https://code.google.com/codejam/contest/544101/dashboard#s=p0
module Rotate where
-- constant imports
import Text.ParserCombinators.Parsec
import Text.Parsec
import System.IO (openFile, hClose, hGetContents, hPutStrLn, IOMode(ReadMode), stderr)
import Debug.Trace (trace)
-- var... | dirkz/google-code-jam-haskell | practice/src/Rotate.hs | mpl-2.0 | 4,736 | 0 | 14 | 1,242 | 2,050 | 1,079 | 971 | 126 | 3 |
-- Lookup each entry in lexicon-dict mapping and replace
-- declarations in lexicon with corresponding ones from dict
import Text.Regex
import Data.Maybe
mapFile="lex-dict-mapping.txt"
dicFile="DictMlt.gf"
lexFile="LexiconMlt.gf"
-- Strip whitespace from a string
strip = lstrip . rstrip
lstrip = dropWhile (`elem` " ... | johnjcamilleri/Maltese-GF-Resource-Grammar | scripts/update_lexicon.hs | lgpl-3.0 | 1,303 | 7 | 17 | 328 | 421 | 204 | 217 | 29 | 2 |
--
-- Minio Haskell SDK, (C) 2017 Minio, 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 ... | donatello/minio-hs | src/Network/Minio/Errors.hs | apache-2.0 | 2,790 | 0 | 7 | 789 | 431 | 233 | 198 | 48 | 1 |
module Aeson.Merge where
import Data.Aeson.Types
import Data.HashMap.Strict as HMS
import Data.Text (unpack)
-- Recursively merges together two JSON Objects. Right-biased; latter elements override earlier ones.
-- Copied from travis-meta-yaml/Data.Aeson.Merge, because it has ridiculous dependencies for what it does.
... | rdnetto/powerline-hs | src/Aeson/Merge.hs | apache-2.0 | 615 | 0 | 8 | 98 | 138 | 75 | 63 | 10 | 1 |
{-# LANGUAGE CPP, MagicHash #-}
module Data.Binary.Serialise.CBOR.FlatTerm (
FlatTerm(..),
toFlatTerm,
fromFlatTerm
) where
import Data.Binary.Serialise.CBOR.Encoding (Encoding(..))
import qualified Data.Binary.Serialise.CBOR.Encoding as Enc
import Data.Binary.Serialise.CBOR.Decoding as Dec
import GHC.W... | thoughtpolice/binary-serialise-cbor | Data/Binary/Serialise/CBOR/FlatTerm.hs | bsd-3-clause | 13,549 | 3 | 16 | 3,811 | 5,035 | 2,515 | 2,520 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.EXT.CullVertex
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
-... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/CullVertex.hs | bsd-3-clause | 824 | 0 | 4 | 97 | 58 | 46 | 12 | 8 | 0 |
module JavaScript.AceAjax.Raw.CommandManager where
import qualified GHCJS.Types as GHCJS
import qualified GHCJS.Marshal as GHCJS
import qualified Data.Typeable
import GHCJS.FFI.TypeScript
import GHCJS.DOM.Types (HTMLElement)
import JavaScript.AceAjax.Raw.Types
foreign import javascript "$1.byName" byName :: CommandMan... | fpco/ghcjs-from-typescript | ghcjs-ace/JavaScript/AceAjax/Raw/CommandManager.hs | bsd-3-clause | 900 | 15 | 8 | 98 | 260 | 148 | 112 | 13 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
module Database.Relational.Schema.SQLServerSyscat.Columns where
import Data.Int (Int32)
import Database.Record.TH (derivingShow)
import Database.Relational.Query.TH (defineTableTypesAndRecordDefault)
$(defineTableTypesAndRecordDefault
"sys" "colum... | yuga/haskell-relational-record-driver-sqlserver | src/Database/Relational/Schema/SQLServerSyscat/Columns.hs | bsd-3-clause | 3,121 | 0 | 9 | 1,282 | 176 | 137 | 39 | 15 | 0 |
module Database.Hitcask.Compact where
import Database.Hitcask.Types
import Database.Hitcask.Restore
import Database.Hitcask.Parsing
import Database.Hitcask.Put
import Database.Hitcask.Hint
import Database.Hitcask.Logs
import Control.Concurrent.STM
import qualified Data.HashMap.Strict as M
import System.IO
import System... | tcrayford/hitcask | Database/Hitcask/Compact.hs | bsd-3-clause | 3,522 | 0 | 11 | 680 | 1,260 | 630 | 630 | 92 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Cloud.AWS.EC2.Types.NetworkInterface
( NetworkInterface(..)
, NetworkInterfaceAssociation(..)
, NetworkInterfaceAttachment(..)
, NetworkInterfaceParam(..)
, NetworkInterfacePrivateIpAddress(..)
, NetworkInterfaceStatus(..)
, SecondaryPrivateIpAddressP... | worksap-ate/aws-sdk | Cloud/AWS/EC2/Types/NetworkInterface.hs | bsd-3-clause | 4,176 | 0 | 9 | 749 | 660 | 404 | 256 | 93 | 0 |
module Aws.Core.Credentials (
Credentials (..),
credentialsDefaultFile,
credentialsDefaultKey,
loadCredentialsFromFile,
loadCredentialsFromEnv,
loadCredentialsFromEnvOrFile,
loadCredentialsDefault,
) where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (m... | RayRacine/aws | Aws/Core/Credentials.hs | bsd-3-clause | 3,449 | 0 | 15 | 677 | 672 | 374 | 298 | 53 | 2 |
-- The Timber compiler <timber-lang.org>
--
-- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of sour... | mattias-lundell/timber-llvm | src/Token.hs | bsd-3-clause | 4,684 | 0 | 10 | 1,588 | 768 | 507 | 261 | 117 | 1 |
module Main where
import Test.Tasty
import Test.Tasty.TestSet
import qualified Test.Unit.Module
import qualified Test.Unit.Persistence
import qualified Test.Unit.UserStory
import qualified Test.Property.Persistence
import qualified Test.Regression.UserStory
main = do
Test.Tasty.defaultMain $ buildTestTree "" $ do
... | andorp/bead | test/TestMain.hs | bsd-3-clause | 543 | 0 | 10 | 71 | 108 | 67 | 41 | 15 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleContexts #-}
module Binary where
import Text.Parsec
import Control.Applicative
import Numeric (readHex)
import System.IO
import Control.Monad
import Data.Array.IO
import Control.Exception.Base
import Data.Word
import Data.Bits
import qualified Data.Byte... | dpiponi/Bine | src/Binary.hs | bsd-3-clause | 809 | 0 | 12 | 148 | 195 | 109 | 86 | 19 | 1 |
{-# OPTIONS_GHC -Wall -Werror #-}
module Main(main) where
import Control.DeepSeq
import Lobster.Common
main :: IO ()
main = do
(options,fns) <- processOptions
domain <- parseAndInterpretPolicyFiles_ options fns
seq (rnf domain) $ return ()
| GaloisInc/sk-dev-platform | libs/lobster-validate/Main.hs | bsd-3-clause | 248 | 0 | 10 | 41 | 81 | 42 | 39 | 9 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.STM
-- Copyright : (c) The University of Glasgow... | gridaphobe/packages-stm | Control/Monad/STM.hs | bsd-3-clause | 3,596 | 0 | 14 | 743 | 560 | 324 | 236 | 23 | 2 |
{-# LANGUAGE UndecidableInstances
, TypeSynonymInstances
, MultiParamTypeClasses
, DeriveDataTypeable
, FlexibleInstances
, OverloadedStrings
, TemplateHaskell
, FlexibleContexts #-}
module MFlow.Wai(
module MFlow.Cookies... | agocorona/MFlow | src/MFlow/Wai.hs | bsd-3-clause | 7,934 | 0 | 38 | 2,870 | 1,646 | 875 | 771 | 125 | 7 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeFamilies, Rank2Types, ScopedTypeVariables #-}
-- |
-- Module : Data.Vector.Storable
-- Copyright : (c) Roman Leshchinskiy 2009-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experimental
-- P... | rleshchinskiy/vector | Data/Vector/Storable.hs | bsd-3-clause | 44,864 | 0 | 14 | 9,857 | 9,906 | 5,487 | 4,419 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Parsec.Token
-- Copyright : (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
-- Por... | maurer/15-411-Haskell-Base-Code | src/Text/Parsec/Token.hs | bsd-3-clause | 25,627 | 0 | 18 | 9,331 | 4,204 | 2,295 | 1,909 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Berp.Base.Identity
-- Copyright : (c) 2010 Bernie Pope
-- License : BSD-style
-- Maintainer : florbitous@gmail.com
-- Stability : experimental
-- Portability : ghc
--
-- A ... | bjpop/berp | libs/src/Berp/Base/Identity.hs | bsd-3-clause | 4,905 | 0 | 6 | 1,136 | 111 | 74 | 37 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
module Lucid.Foundation.Structure.BlockGrid where
import qualified Data.Text as T
import Data.Monoid
small_block_grid_ :: Int -> T.Text
small_block_grid_ n = " small-block-grid-" <> (T.pack $ show n) <> " "
medium_block_grid_ :: Int -> T.Text... | athanclark/lucid-foundation | src/Lucid/Foundation/Structure/BlockGrid.hs | bsd-3-clause | 501 | 0 | 9 | 78 | 140 | 77 | 63 | 11 | 1 |
module TestParsing (parsingTests) where
import Data (LispVal(..))
import Parsing(parseExpr)
import Test.Hspec
import Test.QuickCheck hiding (Result)
import qualified Text.Parsec as P
import TestArbitraryData()
parsingTests :: Spec
parsingTests =
describe "Parsing tests" $ do
parsingNumbers
parsi... | davideGiovannini/scheme-repl | test/TestParsing.hs | bsd-3-clause | 3,300 | 0 | 13 | 590 | 788 | 404 | 384 | 80 | 1 |
{- |
Module : Text.Paraphrase.Debug
Description : Debugging utils to test parsers
Copyright : (c) Ivan Lazar Miljenovic
License : 3-Clause BSD-style
Maintainer : Ivan.Miljenovic@gmail.com
Extra utility functions to obtain internal state of the parser.
-}
module Text.Paraphrase.Debug whe... | ivan-m/paraphrase | src/Text/Paraphrase/Debug.hs | bsd-3-clause | 810 | 0 | 11 | 163 | 142 | 79 | 63 | 9 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Database.EventStore.Internal.Utils
-- Copyright : (C) 2016 Yorick Laupa
-- License : (see the file LICENSE)
--
-- Maintainer : Yorick Laupa <yo.eight@gmail.com>
-- Stability : provisional
-- Portability : non-portable
--
-... | YoEight/eventstore | Database/EventStore/Internal/Utils.hs | bsd-3-clause | 1,018 | 0 | 8 | 85 | 112 | 71 | 41 | 9 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, OverlappingInstances, OverloadedStrings, RecordWildCards #-}
module Demo3Shared (module Demo3SharedNOVCHAN,
module Demo3Vchan) where
import Demo3SharedNOVCHAN
import Demo3Vchan
import qualified Control.Monad.Trans.State as T
import Control.Monad.Trans
| armoredsoftware/protocol | tpm/mainline/shared/Demo3Shared.hs | bsd-3-clause | 317 | 2 | 4 | 37 | 39 | 28 | 11 | 7 | 0 |
module DogTypes where
data PugType = PugData
data HuskyType a = HuskyData
data DogueDeBordeaux doge = DogueDeBordeaux doge
-- Can't do this
-- a isn't in scope as specified by the left
-- side of the = sign
-- data Foo = Bar a
myPug = PugData :: PugType
myPug' = PugData -- we don't have to be explicit
myHusky :: Hu... | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/DogTypesChapter11.hs | mit | 1,671 | 0 | 8 | 328 | 172 | 112 | 60 | 18 | 1 |
{-# LANGUAGE NoImplicitPrelude, DeriveFunctor, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, BangPatterns, RecordWildCards, TypeFamilies, TemplateHaskell #-}
module Lamdu.Infer.Internal.Monad
( Results(..), subst, constraints
, Context(..), ctxResults, initialContext
, InferCtx(..), ... | Peaker/Algorithm-W-Step-By-Step | src/Lamdu/Infer/Internal/Monad.hs | gpl-3.0 | 8,590 | 0 | 13 | 1,861 | 2,233 | 1,210 | 1,023 | -1 | -1 |
-- | This module defines a simple command line interface for the SubScript
-- interpreter. If your solution is correct, this module should just
-- work.
module Main
(main)
where
import SubsAst
import SubsInterpreter
import SubsParser(parseString)
import Control.Monad(forM_)
import Data.List(intercalate)
import... | Rathcke/uni | ap/exam/src/subs/Subs.hs | gpl-3.0 | 1,145 | 0 | 23 | 366 | 333 | 171 | 162 | 30 | 4 |
{- |
Module : Data.RME.Base
Copyright : Galois, Inc. 2016
License : BSD3
Maintainer : huffman@galois.com
Stability : experimental
Portability : portable
Reed-Muller Expansion normal form for Boolean Formulas.
-}
module Data.RME.Base
( RME
, true, false, lit
, constant, isBool
, compl, xor, conj,... | GaloisInc/saw-script | rme/src/Data/RME/Base.hs | bsd-3-clause | 4,281 | 0 | 12 | 1,166 | 1,662 | 861 | 801 | 107 | 3 |
-- (c) The University of Glasgow 2006-2012
{-# LANGUAGE CPP #-}
module Kind (
-- * Main data type
Kind, typeKind,
-- ** Predicates on Kinds
isLiftedTypeKind, isUnliftedTypeKind,
isConstraintKind,
returnsTyCon, returnsConstraintKind,
isConstraintKindCon,
... | nushio3/ghc | compiler/types/Kind.hs | bsd-3-clause | 4,685 | 0 | 10 | 1,054 | 576 | 320 | 256 | 52 | 1 |
module Distribution.Utils.NubList
( NubList -- opaque
, toNubList -- smart construtor
, fromNubList
, overNubList
, NubListR
, toNubListR
, fromNubListR
, overNubListR
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Simple.Utils
import qualifi... | sopvop/cabal | Cabal/Distribution/Utils/NubList.hs | bsd-3-clause | 3,463 | 0 | 9 | 710 | 793 | 432 | 361 | 50 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeOperators #-}
module DirectoryServerRest where
import Control.Monad.Trans.Except
import Control.Monad.IO.Class
import Data.Aeson
import Data.Proxy
import GHC.Generics
i... | Garygunn94/DFS | .stack-work/intero/intero84265nt.hs | bsd-3-clause | 2,749 | 0 | 17 | 576 | 643 | 346 | 297 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
{-# OPTIONS -Wall #-}
import Language.Paraiso.Generator (generateIO)
import qualified Language.Paraiso.Generator.Claris as C
import qualified Language.Paraiso.Generator.Native as Native
import Language.Paraiso.Name
import Language.Para... | nushio3/Paraiso | attic/Claris/Simple.hs | bsd-3-clause | 1,693 | 0 | 13 | 447 | 590 | 316 | 274 | 41 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
module SortNetObs where
import Obsidian
import Obsidian.Run.CUDA.Exec as CUDA hiding (exec)
import qualified Data.Vector.Storable as... | aesadde/AccObsBenchmarks | Sort/haskell/src/SortNetObs.hs | bsd-3-clause | 2,739 | 0 | 17 | 970 | 1,035 | 532 | 503 | 71 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module System.Console.CmdArgs.Test.GetOpt where
import Data.Data
import System.Console.CmdArgs.GetOpt
import qualified System.Console.CmdArgs.Explicit as Explicit
import System.Console.CmdArgs.Test.Util
data Flag = Verbose | Version | Name String | Output String | Arg String deri... | copland/cmdargs | System/Console/CmdArgs/Test/GetOpt.hs | bsd-3-clause | 1,689 | 0 | 15 | 363 | 547 | 300 | 247 | 30 | 2 |
{- |
Module : $Id$
Description : converting Kif to CASL
Copyright : (c) C.Maeder, Uni Bremen 2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : portable
convert .kif to .casl
-}
module Main where
import CASL.Kif
import CAS... | keithodulaigh/Hets | CASL/fromKif.hs | gpl-2.0 | 742 | 0 | 19 | 166 | 176 | 89 | 87 | 18 | 2 |
module Deriving.Typeable(deriveTypeable) where
import Deriving.Type
import Deriving.Util
import FrontEnd.HsSyn
import FrontEnd.Syn.Q
import Name.Names
deriveTypeable :: Int -> Name -> Derive -> Module -> Data -> Q HsDecl
deriveTypeable tnum tname der mod d@D { .. } = do
mkInstN tnum der mod d tname []
| hvr/jhc | src/Deriving/Typeable.hs | mit | 309 | 0 | 10 | 51 | 108 | 58 | 50 | -1 | -1 |
module Infix1 where
data Inf = Nil | Int :* [Int]
f :: Inf -> Int
f Nil = 0
f ((x :* xs))
= case xs of
xs@[] -> x + (head xs)
xs@(b_1 : b_2) -> x + (head xs)
f ((x :* xs)) = x + (head xs)
| kmate/HaRe | old/testing/introCase/InfixIn1AST.hs | bsd-3-clause | 223 | 0 | 10 | 86 | 135 | 74 | 61 | 9 | 2 |
{-# LANGUAGE ScopedTypeVariables, DatatypeContexts #-}
module Main where
{-
- This is a test framework for Arrays, using QuickCheck
-
-}
import qualified Data.Array as Array
import Data.List
import Control.Monad ( liftM2, liftM3, liftM4 )
import System.Random
import Data.Ix
import Data.List( (\\) )
infixl 9 ... | frantisekfarka/ghc-dsi | testsuite/tests/array/should_run/arr016.hs | bsd-3-clause | 15,808 | 25 | 28 | 5,016 | 6,792 | 3,566 | 3,226 | -1 | -1 |
{-# LANGUAGE TypeFamilies, PartialTypeSignatures #-}
-- In Trac #12033 this was called HsakellBug.hs
module T12033 where
tripleStoreToRuleSet :: v -> v
tripleStoreToRuleSet getAtom
= makeTuple getAtom
where
makeRule v = makeExpression v
makeTuple v = makeExpression v
makeExpression :: _
makeExpression v... | ezyang/ghc | testsuite/tests/partial-sigs/should_compile/T12033.hs | bsd-3-clause | 341 | 0 | 7 | 61 | 66 | 34 | 32 | 9 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Layout (relayout, cycleLayout, insertViewInOutput) where
import Control.Lens
import StackSet
import WLC hiding (size)
import Tree
import LayoutType
relayout :: StackSet i WLCV... | cocreature/reactand | src/Layout.hs | isc | 2,721 | 0 | 18 | 912 | 731 | 368 | 363 | -1 | -1 |
module Data.BinomialHeap'(
BinomialHeap(..),
rank, root, tree, link, insTree, removeMinTree,
empty,
isEmpty,
insert,
merge,
findMin,
deleteMin,
) where
import Data.Heap
data Tree a = N a [Tree a] deriving (Show,Eq)
newtype BinomialHeap a = BH [(Int, Tree a)]
link :: Ord a => (Int, Tree a) -> (Int, Tr... | syunta/PFDS | Data/BinomialHeap'.hs | mit | 1,992 | 0 | 13 | 573 | 1,207 | 638 | 569 | 54 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.