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 Language.Java.Jdi.EventRequest
( EventRequest
, enable
, disable
, addCountFilter
, createClassPrepareRequest
, createBreakpointRequest
, createStepRequest
) where
import Language.Java.Jdi.Impl
| VictorDenisov/jdi | src/Language/Java/Jdi/EventRequest.hs | gpl-2.0 | 202 | 0 | 4 | 21 | 38 | 26 | 12 | 9 | 0 |
((a, b), c) | hmemcpy/milewski-ctfp-pdf | src/content/1.6/code/haskell/snippet02.hs | gpl-3.0 | 11 | 0 | 6 | 2 | 16 | 9 | 7 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module Data.PaperStatus where
import Database.Persist.TH
import Prelude
data PaperStatus = SReject | WReject | Neutral | WAccept | SAccept | NotReviewed
deriving (Show, Read, Eq)
derivePersistField "PaperStatus"
| ackao/APRICoT | web/conference-management-system/Data/PaperStatus.hs | gpl-3.0 | 251 | 0 | 6 | 37 | 59 | 35 | 24 | 7 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
module InnerEar.Exercises.OddEvenAll (oddEvenAllExercise) where
import Reflex
import Reflex.Dom
import Data.Map
import Text.JSON
import Text.JSON.Generic
import Sound.MusicW hiding (Frequency)
import InnerEar.Exercises.MultipleChoice
import InnerEar.Types.ExerciseId
import InnerE... | JamieBeverley/InnerEar | src/InnerEar/Exercises/OddEvenAll.hs | gpl-3.0 | 3,092 | 0 | 15 | 509 | 1,134 | 595 | 539 | 65 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Lamdu.Infer.Error
( Error(..)
) where
import Lamdu.Expr.Constraints (Constraints)
import qualified Lamdu.Expr.Type as T
import qualified Lamdu.Expr.Val as V
import Text.PrettyPrint ((<+>), Doc)
import Text.PrettyPrint.HughesPJClass (Prett... | da-x/Algorithm-W-Step-By-Step | Lamdu/Infer/Error.hs | gpl-3.0 | 1,689 | 0 | 9 | 419 | 439 | 236 | 203 | 42 | 0 |
-- |
module Async where
import Control.Concurrent
-- Represent an asynchronous action that has been started.
data Async a
async :: IO a -> IO (Async a)
async = undefined
wait :: Async a -> IO a
wait = undefined
| capitanbatata/marlows-parconc-exercises | parconc-ch08/src/Async.hs | gpl-3.0 | 226 | 0 | 8 | 55 | 61 | 34 | 27 | -1 | -1 |
module Main where
import Test.QuickCheck
import Mangling
import Data.Either (lefts, rights)
import Data.List (inits)
allNumerics :: [Numeric]
allNumerics = [Intval x | x <- [0..35]] ++
[ Variable x | x <- [0..7]] ++
[ MaxLength
, MaxLengthMinus1
, MaxLengthPlus1
... | bartavelle/manglingrules | test/tests.hs | gpl-3.0 | 3,764 | 0 | 18 | 1,506 | 989 | 538 | 451 | 102 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Pirandello.Config ( ParseException, Config (..), Host, Port
, defaultPort, defaultConfig, decodeConfigFile, defaultConfigFile )
where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero)
import Control.Monad.T... | rimmington/pirandello | src/Pirandello/Config.hs | gpl-3.0 | 1,481 | 0 | 12 | 360 | 362 | 216 | 146 | -1 | -1 |
{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-}
{-# LANGUAGE DeriveGeneric #-}
module Layout.Mod
( Mod(Mod)
, isEmptyMod
, applyMod
, applyInverseMod
) where
import BasePrelude
import Prelude.Unicode
import Data.Monoid.Unicode ((∅), (⊕))
import Data.Aeson
import Layout.Pos (Pos)
import Permuta... | 39aldo39/klfc | src/Layout/Mod.hs | gpl-3.0 | 971 | 0 | 9 | 192 | 306 | 173 | 133 | 34 | 1 |
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses #-}
{-# OPTIONS -Wall #-}
-- | Canonical vertex ordering for faces of a triangulation
module Triangulation.CanonOrdered(
module Triangulation,
CanonOrdered(..),COIEdge,CO... | DanielSchuessler/hstri | Triangulation/CanonOrdered.hs | gpl-3.0 | 3,138 | 0 | 15 | 658 | 731 | 382 | 349 | 67 | 2 |
{-# 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 #-}
-- ... | olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/UpdateUser.hs | mpl-2.0 | 4,242 | 0 | 11 | 861 | 535 | 327 | 208 | 68 | 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-iam/gen/Network/AWS/IAM/PutUserPolicy.hs | mpl-2.0 | 4,618 | 0 | 9 | 900 | 528 | 326 | 202 | 71 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/TestMetricFilter.hs | mpl-2.0 | 4,403 | 0 | 10 | 905 | 591 | 350 | 241 | 68 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/Sponsors/List.hs | mpl-2.0 | 4,109 | 0 | 15 | 996 | 562 | 332 | 230 | 82 | 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-iam/gen/Network/AWS/IAM/ListPolicies.hs | mpl-2.0 | 8,098 | 0 | 15 | 1,757 | 1,182 | 704 | 478 | 126 | 1 |
-- Copyright 2017 Lukas Epple
--
-- This file is part of likely music.
--
-- likely music is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) ... | sternenseemann/likely-music | lib/Sound/Likely.hs | agpl-3.0 | 4,176 | 0 | 16 | 1,002 | 1,350 | 706 | 644 | 103 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module GoNoGo where
------------------------------------------------------------------------------
import MissionControl
import ... | haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/2020-07-07-harold-carr-phantom-existential-scratchpad/src/GoNoGo.hs | unlicense | 691 | 0 | 7 | 142 | 66 | 41 | 25 | 11 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module IFind.Config (
IFindConfig(..),
FindFilters(..),
UIColors(..),
readConfFile
) where
import Data.Aeson
import Data.Aeson.Encode.Pretty
import Data.Aeson.TH
import Graphics.Vty.Attributes
import System.Directory
import System.Exit (exitFailure)
import qualified Data.Byte... | andreyk0/ifind | IFind/Config.hs | apache-2.0 | 3,744 | 0 | 12 | 1,330 | 707 | 400 | 307 | 97 | 4 |
-- Copyright (c) 2010 - Seweryn Dynerowicz
-- 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... | sdynerow/Semirings-Library | haskell/Algebra/Constructs/Lexicographic.hs | apache-2.0 | 1,925 | 0 | 12 | 449 | 707 | 374 | 333 | 33 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-
Copyright 2018 The CodeWorld Authors. All rights reserved.
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://ww... | tgdavies/codeworld | codeworld-compiler/src/Compile.hs | apache-2.0 | 8,890 | 0 | 30 | 3,920 | 1,562 | 785 | 777 | 204 | 10 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE BangPatterns #-}
module Data.CRF.Chain1.Constrained.Intersect
( intersect
) where
import qualified Data.Vector.Unboxed as U
import Data.CRF.Chain1.Constrained.Dataset.Internal (Lb, AVec, unAVec)
import Data.CRF.Chain1.Constrained.Model (FeatIx)
-- | Assumption: both in... | kawu/crf-chain1-constrained | src/Data/CRF/Chain1/Constrained/Intersect.hs | bsd-2-clause | 2,352 | 0 | 14 | 707 | 442 | 258 | 184 | 30 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module RefTrack.OAI.Arxiv ( getRecord
) where
import Control.Applicative
import Control.Error
import Data.Char (isSpace)
import Data.Maybe
import Data.Monoid
import qualified Data.Text as T
import ... | bgamari/reftrack | RefTrack/OAI/Arxiv.hs | bsd-3-clause | 2,516 | 0 | 17 | 954 | 593 | 309 | 284 | 52 | 2 |
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE... | pbrisbin/yesod-comments | Yesod/Comments/Storage.hs | bsd-3-clause | 3,542 | 0 | 18 | 918 | 723 | 393 | 330 | 64 | 3 |
module Anatomy.Debug where
import Debug.Trace
import Text.Show.Pretty
debugging :: Bool
debugging = False
debug :: (Show a, Show b) => b -> a -> a
debug s v
| debugging = trace (prettyShow s ++ ": " ++ prettyShow v) v
| otherwise = v
dump :: (Monad m, Show a) => a -> m ()
dump x
| debugging = trace (pr... | vito/atomo-anatomy | src/Anatomy/Debug.hs | bsd-3-clause | 429 | 0 | 10 | 104 | 199 | 100 | 99 | 15 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.SGIS.TextureBorderClamp
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Port... | haskell-opengl/OpenGLRaw | src/Graphics/GL/SGIS/TextureBorderClamp.hs | bsd-3-clause | 679 | 0 | 5 | 91 | 47 | 36 | 11 | 7 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Uninterpreted.Function
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : [email protected]
-- Stability : experimental
--
-- Testsuite for Data.SBV.Examples.Uninterpreted.Function
-... | josefs/sbv | SBVTestSuite/TestSuite/Uninterpreted/Function.hs | bsd-3-clause | 645 | 0 | 9 | 80 | 64 | 42 | 22 | 7 | 1 |
-- |
-- Module: Graphics.LWGL.Vertex_P
-- Copyright: (c) 2017 Patrik Sandahl
-- Licence: BSD3
-- Maintainer: Patrik Sandahl <[email protected]>
-- Stability: experimental
-- Portability: portable
-- Language: Haskell2010
module Graphics.LWGL.Vertex_P
( Vertex (..)
, makeVertexArrayObject
) where
imp... | psandahl/light-weight-opengl | src/Graphics/LWGL/Vertex_P.hs | bsd-3-clause | 1,759 | 0 | 11 | 410 | 340 | 178 | 162 | 34 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module HaskellCI.Config.CopyFields where
import HaskellCI.Prelude
import qualified Distribution.Compat.CharParsing as C
import qualified Distribution.Parsec as C
import qualified Distribution.Pretty as C
import quali... | hvr/multi-ghc-travis | src/HaskellCI/Config/CopyFields.hs | bsd-3-clause | 1,039 | 0 | 11 | 196 | 192 | 113 | 79 | 23 | 1 |
module Distribution.ArchLinux.Libalpm.Wrapper.Options where
import Control.Monad.Reader
import Distribution.ArchLinux.Libalpm.Wrapper.Types
import Distribution.ArchLinux.Libalpm.Wrapper.Callbacks
import Distribution.ArchLinux.Libalpm.Wrapper.Alpm
type AlpmOptions = [AlpmOption]
data AlpmOption = AlpmOption
withAlp... | netvl/alpmhs | lib/Distribution/ArchLinux/Libalpm/Wrapper/Options.hs | bsd-3-clause | 841 | 0 | 14 | 166 | 205 | 113 | 92 | 19 | 1 |
import Data.List
import Data.List.Split
import Data.Ord
flipLog (b:e) = (head e) * (log b)
largestExponential xs = snd . maximum $ zip (map flipLog xs) [1..]
main = readFile "099.txt" >>= print . largestExponential . map (map (read::String->Float) . (splitOn ",")) . lines
| JacksonGariety/euler.hs | 099.hs | bsd-3-clause | 274 | 0 | 12 | 44 | 133 | 69 | 64 | 6 | 1 |
module Main where
import GraphDraw.TestFgl
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
import Data.List
myGraph :: Gr [Char] ()
myGraph = mkGraph
[(1, "A"), (2, "B"), (3, "C"), (4, "D"), (5, "E"), (6, "E"), (7, "E")]
[(1... | prash471/GraphDraw | Main.hs | bsd-3-clause | 1,661 | 0 | 13 | 315 | 441 | 252 | 189 | 19 | 1 |
module Text.XML.YJSVG (
SVG(..), Position(..), Color(..), Transform(..),
Font(..), FontWeight(..),
showSVG, topleft, center,
) where
import Text.XML.HaXml(
AttValue(..), QName(..), Prolog(..),
EncodingDecl(..), XMLDecl(..), SystemLiteral(..), PubidLiteral(..),
ExternalID(..), DocTypeDecl(..), Misc(..), Element(.... | YoshikuniJujo/yjsvg_haskell | src/Text/XML/YJSVG.hs | bsd-3-clause | 7,487 | 166 | 17 | 1,614 | 3,851 | 2,055 | 1,796 | 176 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Redeux.DOM (module Redeux.DOM, DOM) where
import Redeux.Core
import Redeux.DOM.Core
import Data.Text (Text)
import qualified Data.Text as Text
div_, span_, p_, a_, h1_, h2_, h3_
, section_, footer_, header_, strong_
, label_, ul_, li_
, button_ :: [AttrOrHandler g] -> ... | eborden/redeux | src/Redeux/DOM.hs | bsd-3-clause | 1,992 | 0 | 11 | 447 | 673 | 366 | 307 | 61 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module Missile where
import Data.Data
import Data.Typeable
import Coordinate
type Missile = String
type Missiles = [String]
data Speed = Speed { x :: Float, y :: Float } deriving (Data, Typeable, Show)
data MissileLaunched = MissileLaunched { code :: String, speed :: Speed, pos ::... | timorantalaiho/pong11 | src/Missile.hs | bsd-3-clause | 1,142 | 0 | 11 | 188 | 339 | 188 | 151 | 22 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances,Rank2Types, ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS -Wall #-}
module PushdownAutomaton.State (
PDAState(PDAState),
PDAStaten, initialStackn, initialPDAStaten,
PDATransn, gcompile, t... | davidzhulijun/TAM | PushdownAutomaton/State.hs | bsd-3-clause | 2,717 | 0 | 14 | 556 | 1,022 | 560 | 462 | 49 | 1 |
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2006
--
-- The purpose of this module is to transform an HsExpr into a CoreExpr which
-- when evaluated, returns a (Meta.Q Meta.Exp) computation analogous to the
-- input HsExpr. We do this in the DsM monad... | nomeata/ghc | compiler/deSugar/DsMeta.hs | bsd-3-clause | 103,047 | 339 | 21 | 24,790 | 29,747 | 15,416 | 14,331 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
import Control.Monad
import Control.Monad.Identity
import Control.Monad.Trans
import Reflex.Dom... | mightybyte/reflex-dom | test/prebuild.hs | bsd-3-clause | 5,028 | 0 | 27 | 1,537 | 611 | 321 | 290 | 42 | 2 |
{-|
Module : Diplomacy.Occupation
Description : Definition of Zone/ProvinceTarget occupation.
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : [email protected]
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
module Diplomacy.Occupat... | avieth/diplomacy | Diplomacy/Occupation.hs | bsd-3-clause | 2,765 | 0 | 14 | 563 | 630 | 333 | 297 | 55 | 3 |
{-- snippet modifyMVar --}
import Control.Concurrent (MVar, putMVar, takeMVar)
import Control.Exception (block, catch, throw, unblock)
import Prelude hiding (catch) -- use Control.Exception's version
modifyMVar :: MVar a -> (a -> IO (a,b)) -> IO b
modifyMVar m io =
block $ do
a <- takeMVar m
(b,r) <- unbloc... | binesiyu/ifl | examples/ch24/ModifyMVar.hs | mit | 436 | 0 | 12 | 102 | 166 | 88 | 78 | 11 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for "Ganeti.Runtime".
-}
{-
Copyright (C) 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; eit... | ribag/ganeti-experiments | test/hs/Test/Ganeti/Runtime.hs | gpl-2.0 | 4,893 | 0 | 14 | 1,444 | 558 | 282 | 276 | 57 | 2 |
module TypeBug6 where
f :: [[String]]->[String]
f [x] = []
f [x,y] = x ++ filter (not.eqString (unwords(concat x y))) y
f (x:y:z) = f (x:y) ++ f (x:z)
| roberth/uu-helium | test/simple/typeerrors/Examples/TypeBug6.hs | gpl-3.0 | 158 | 0 | 12 | 36 | 123 | 66 | 57 | 5 | 1 |
{-|
A 'TimeclockEntry' is a clock-in, clock-out, or other directive in a timeclock
file (see timeclock.el or the command-line version). These can be
converted to 'Transactions' and queried like a ledger.
-}
{-# LANGUAGE OverloadedStrings #-}
module Hledger.Data.Timeclock (
timeclockEntriesToTransactions
,tests... | adept/hledger | hledger-lib/Hledger/Data/Timeclock.hs | gpl-3.0 | 6,665 | 0 | 20 | 1,567 | 1,747 | 926 | 821 | 110 | 2 |
<?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="ja-JP">
<title>TLS デバッグ | ZAP拡張</title>
<maps>
<homeID>top</homeID>
<mapref location="... | veggiespam/zap-extensions | addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_ja_JP/helpset_ja_JP.hs | apache-2.0 | 1,000 | 91 | 61 | 159 | 404 | 205 | 199 | -1 | -1 |
module VarPtr where
import Data.Var
data Record = Record Int
main = do
v <- newVar $ Record 5
subscribeAndRead v $ \y -> case y of
Record a -> putStrLn . show $ a
set v $ Record 10
| beni55/fay | tests/VarPtr.hs | bsd-3-clause | 195 | 0 | 13 | 54 | 86 | 42 | 44 | 8 | 1 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP, DeriveFunctor #-}
module Unify (
-- Matching of types:
-- the "tc" prefix indicates that matching always
-- respects newtypes (rather than looking through them)
tcMatchTy, tcUnifyTyWithTFs, tcMatchTys, tcMatchTyX, tcMatc... | AlexanderPankiv/ghc | compiler/types/Unify.hs | bsd-3-clause | 29,646 | 15 | 16 | 9,074 | 4,744 | 2,473 | 2,271 | 324 | 9 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Texturing.Specification
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portability : ... | IreneKnapp/direct-opengl | Graphics/Rendering/OpenGL/GL/Texturing/Specification.hs | bsd-3-clause | 15,581 | 0 | 14 | 2,231 | 3,051 | 1,601 | 1,450 | 226 | 2 |
{-# language OverloadedStrings #-}
module Yi.Keymap.Vim.Substitution
( substituteE
, substituteConfirmE
, repeatSubstitutionE
, repeatSubstitutionFlaglessE
) where
import Control.Monad (void)
import Data.Monoid
import Yi.MiniBuffer
import Yi.Keymap (Keymap)
import qualified Yi.Rope as R
import Yi.... | noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Substitution.hs | gpl-2.0 | 4,036 | 0 | 21 | 1,103 | 1,067 | 540 | 527 | 77 | 5 |
{- data size display and parsing
-
- Copyright 2011 Joey Hess <[email protected]>
-
- License: BSD-2-clause
-
-
- And now a rant:
-
- In the beginning, we had powers of two, and they were good.
-
- Disk drive manufacturers noticed that some powers of two were
- sorta close to some powers of ten, and that round... | avengerpenguin/propellor | src/Utility/DataUnits.hs | bsd-2-clause | 4,700 | 34 | 13 | 1,008 | 1,292 | 663 | 629 | 90 | 3 |
{-# LANGUAGE LambdaCase, RankNTypes, ScopedTypeVariables #-}
module Stream.Folding.Prelude (
break
, concats
, cons
, drop
, lenumFrom
, lenumFromStepN
, lenumFromTo
, lenumFromToStep
, filter
, filterM
, foldl
, iterate
, iterateM
, joinFold
, map
, map... | haskell-streaming/streaming | benchmarks/old/Stream/Folding/Prelude.hs | bsd-3-clause | 13,598 | 0 | 21 | 4,483 | 6,173 | 3,198 | 2,975 | 323 | 3 |
{-# LANGUAGE PackageImports #-}
import "devel-example" DevelExample (develMain)
main :: IO ()
main = develMain
| s9gf4ult/yesod | yesod-bin/devel-example/app/devel.hs | mit | 112 | 0 | 6 | 16 | 26 | 15 | 11 | 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="sq-AL">
<title>Script Console</title>
<maps>
<homeID>top</homeID>
<mapref location="map... | kingthorin/zap-extensions | addOns/scripts/src/main/javahelp/org/zaproxy/zap/extension/scripts/resources/help_sq_AL/helpset_sq_AL.hs | apache-2.0 | 959 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
module X (x, D1(..), D2(..))
where
data D1 = D { f :: D2 } -- deriving Show
data D2 = A | B -- deriving Show
x :: D1
x = D { f = A }
| olsner/ghc | testsuite/tests/driver/recomp010/X1.hs | bsd-3-clause | 137 | 0 | 8 | 42 | 68 | 44 | 24 | 5 | 1 |
-- Test for trac #2956
module TH_sections where
two :: Int
two = $( [| (1 +) 1 |] )
three :: Int
three = $( [| (+ 2) 1 |] )
| urbanslug/ghc | testsuite/tests/th/TH_sections.hs | bsd-3-clause | 129 | 0 | 6 | 36 | 39 | 26 | 13 | -1 | -1 |
-- | A primitive expression is an expression where the non-leaves are
-- primitive operators. Our representation does not guarantee that
-- the expression is type-correct.
module Futhark.Analysis.PrimExp
( PrimExp (..)
, evalPrimExp
, primExpType
, coerceIntPrimExp
, module Futhark.Representation.Primitive
... | ihc/futhark | src/Futhark/Analysis/PrimExp.hs | isc | 9,115 | 0 | 13 | 2,504 | 3,391 | 1,615 | 1,776 | 181 | 1 |
module Oczor.CodeGen.CodeGenJs where
import Oczor.CodeGen.Utl
codeGen :: Ast -> Doc
codeGen = x
where
x = cata $ \case
NoneF -> empty
UniqObjectF {} -> text "{}"
CodeF x -> text x
NotEqualF x y -> sep [x, text "!=", y]
EqualF x y -> sep [x, text "==", y]
LitF value -> lit value
IdentF n... | ptol/oczor | src/Oczor/CodeGen/CodeGenJs.hs | mit | 2,395 | 0 | 19 | 498 | 1,003 | 523 | 480 | -1 | -1 |
import Test.HUnit
import Q11
import Q12
assertEqualIntList :: String -> [Int] -> [Int] -> Assertion
assertEqualIntList = assertEqual
test1 = TestCase (assertEqualIntList "decodeModified [] should be [] ." ([] ) (decodeModified [] ))
test2 = TestCa... | cshung/MiscLab | Haskell99/q12.test.hs | mit | 1,227 | 0 | 12 | 302 | 366 | 203 | 163 | 12 | 1 |
------------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this module.
module Site (app) where
-------------------------... | thorinii/oldtoby-server | main/src/Site.hs | mit | 1,005 | 0 | 9 | 116 | 128 | 72 | 56 | 12 | 1 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, PatternGuards #-}
-- Copyright (c) 2004-6 Donald Bruce Stewart - http://www.cse.unsw.edu.au/~dons
-- GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html)
-- | A Haskell evaluator for the pure part, using plugs
module Plugin.Eval where
import File (fin... | zeekay/lambdabot | Plugin/Eval.hs | mit | 8,059 | 0 | 20 | 2,469 | 1,240 | 668 | 572 | 83 | 7 |
module Assembler.Types where
import Data.Word
-- Constant is either an int or a label which resolves to an int
type Label = String
type Constant = Either Int Label
type RegId = Word8
data Instr = Halt
| Nop
| Rrmovl RegId RegId
| Irmovl RegId Constant
| Rmmovl RegId ... | aufheben/Y86 | Assembler/src/Assembler/Types.hs | mit | 1,097 | 0 | 7 | 514 | 237 | 141 | 96 | 37 | 0 |
module Vector2D where
type Vector2D = (Double, Double)
zero :: Vector2D
zero = (0, 0)
unit :: Vector2D
unit = (1, 1)
fromScalar :: Double -> Vector2D
fromScalar scalar = (scalar, scalar)
fromAngle :: Double -> Vector2D
fromAngle angle = (cos angle, sin angle)
magnitude :: Vector2D -> Double
magnitude vector = sqrt... | jlturner/vector2d-haskell | Vector2D.hs | mit | 4,542 | 0 | 11 | 1,250 | 1,618 | 869 | 749 | 85 | 1 |
{-# LANGUAGE CPP, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Crypto.Nettle.Ciphers
-- Copyright : (c) 2013 Stefan Bühler
-- License : MIT-style (see the file COPYING)
--
-- Maintainer : s... | stbuehler/haskell-nettle | src/Crypto/Nettle/Ciphers.hs | mit | 23,016 | 8 | 11 | 4,318 | 3,722 | 1,942 | 1,780 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Lib
( someFunc
) where
import Reflex.Dom
import Data.JSString ()
import GHCJS.Types
import GUI.ChannelDrawer
import GUI.Player
import Data.Monoid
someFunc :: IO ()
someFunc = mainWidget m... | simonvandel/tvheadend-frontend | src/Lib.hs | mit | 1,429 | 4 | 19 | 367 | 275 | 135 | 140 | 33 | 1 |
module LogicCode
( HuffmanNode,
truthTable,
grayCode,
huffmanCode
) where
data HuffmanNode a = Empty | Leaf (a, Int) | Branch Int (HuffmanNode a) (HuffmanNode a)
--Problem 46 - 49: Problem 48: Truth tables for logical expressions.
--Eg: truthTable 3 (\[a, b, c] -> Logical expr involving a, b, and c)
truthTable... | 5hubh4m/99-haskell-problems | LogicCode.hs | mit | 2,437 | 0 | 15 | 573 | 1,044 | 555 | 489 | 45 | 7 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE CPP #-}
module Data.Bson.Types
( RegexOption(..)
, RegexOptions
, Value(..)
, Binary(..)
, ObjectId(..)
, Document
, Array
, Label
, Field
) where
import Data.Int (Int32, Int64)
import Data.Time.Clock (UTCTime)
import Data.Time.F... | lambda-llama/bresson | src/Data/Bson/Types.hs | mit | 2,635 | 0 | 9 | 774 | 515 | 312 | 203 | 75 | 0 |
module Graphics.Urho3D.UI.Internal.Sprite(
Sprite
, spriteCntx
, sharedSpritePtrCntx
, SharedSprite
) where
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Context as C
import qualified Language.C.Types as C
import Graphics.Urho3D.Container.Ptr
import qualified Data.Map as Map
... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Internal/Sprite.hs | mit | 494 | 0 | 11 | 89 | 120 | 80 | 40 | -1 | -1 |
-- Examples from chapter 8
-- http://learnyouahaskell.com/making-our-own-types-and-typeclasses
import qualified Data.Map as Map
data Point = Point Float Float deriving (Show)
data Shape = Circle Point Float | Rectangle Point Point deriving (Show)
surface :: Shape -> Float
surface (Circle _ r) = pi * r ^ 2
surface (Re... | Sgoettschkes/learning | haskell/LearnYouAHaskell/08.hs | mit | 3,046 | 0 | 11 | 813 | 1,260 | 670 | 590 | 78 | 3 |
{-|
Module: Flaw.UI.ScrollBox
Description: Scroll box.
License: MIT
-}
module Flaw.UI.ScrollBox
( ScrollBox(..)
, newScrollBox
, ScrollBar(..)
, newScrollBar
, newVerticalScrollBar
, newHorizontalScrollBar
, processScrollBarEvent
, ensureVisibleScrollBoxArea
) where
import Control.Concurrent.STM
imp... | quyse/flaw | flaw-ui/Flaw/UI/ScrollBox.hs | mit | 10,754 | 0 | 30 | 2,656 | 2,938 | 1,464 | 1,474 | 260 | 3 |
module Diamond (diamond) where
diamond :: Char -> Maybe [String]
diamond = error "You need to implement this function"
| exercism/xhaskell | exercises/practice/diamond/src/Diamond.hs | mit | 120 | 0 | 7 | 20 | 32 | 18 | 14 | 3 | 1 |
import Control.Monad
main = print . msum $ do
x <- [ 1 .. 1000 ]
y <- [x + 1 .. div (1000 - x) 2 ]
let z = 1000 - x - y
return $ if x^2 + y^2 == z^2 && x + y + z == 1000
then Just $ x * y * z
else Nothing
| nickspinale/euler | complete/009.hs | mit | 253 | 0 | 18 | 110 | 141 | 72 | 69 | 8 | 2 |
module BFLib.BrainfuchFollow where
import Control.Monad.State
import Control.Monad.Writer
import System.IO
import BFLib.Brainfuch (Code
, Stack
, bfTail
, emptyStack
, incPtr
, decPtr
, incCell
, decCell
, bfGetLoop
, bfDropLoop)
{-
- Syntax
... | dermesser/Brainfuch | BFLib/BrainfuchFollow.hs | mit | 2,592 | 0 | 17 | 1,043 | 839 | 457 | 382 | 54 | 9 |
module PartialRecordSel where
-- Partial record selectors use 'error' in the output (which is undefined)
-- Would be better to use 'panic' (or be able to skip them entirely).
data R = R1 { a :: Bool } | R2 { b :: Bool }
| antalsz/hs-to-coq | examples/base-tests/PartialRecordSel.hs | mit | 222 | 0 | 8 | 47 | 32 | 21 | 11 | 2 | 0 |
module Examples.EX3 where
import Control.Lens
import Control.Lens.Setter
import Control.Monad (void)
import Control.Monad.Trans.Class (lift)
import Data.List (intersperse, isPrefixOf)
import Data.Time.LocalTime
import Data.Maybe (catMaybes)
import Twilio.Key
import Twilio.IVR
data User = User {
lastname :: Stri... | steven777400/TwilioIVR | src/Examples/EX3.hs | mit | 1,669 | 1 | 16 | 427 | 518 | 264 | 254 | 44 | 3 |
{-# OPTIONS_GHC -Wall #-}
module LogAnalysis where
import Log
import Data.Char (isDigit)
parseMessage :: String -> LogMessage
parseMessage (x:' ':xs)
| x == 'I' = LogMessage Info first body
| x == 'W' = LogMessage Warning first body
| x == 'E' = LogMessage (Error first) second (trim body)
where body ... | tylerjl/cis194 | old/hw02/LogAnalysis.hs | mit | 1,674 | 0 | 11 | 453 | 716 | 360 | 356 | 43 | 4 |
{-|
Module : Export.TimetableImageCreator
Description : Primarily defines a function used to render SVGs with times.
-}
module Export.TimetableImageCreator
(renderTable, renderTableHelper, times) where
import Data.List (intersperse)
import qualified Data.Text as T
import Diagrams.Backend.SVG
import Di... | Courseography/courseography | app/Export/TimetableImageCreator.hs | gpl-3.0 | 3,855 | 44 | 18 | 772 | 1,286 | 666 | 620 | 82 | 2 |
{-# LANGUAGE QuasiQuotes,DataKinds,GADTs,RankNTypes,ScopedTypeVariables,KindSignatures,TemplateHaskell, FlexibleInstances,TypeFamilies #-}
module Z3Tutorial where
import Language.SMTLib2
import Language.SMTLib2.Pipe (createPipe)
import Language.SMTLib2.Debug (debugBackend)
import qualified Language.SMTLib2.Internals.T... | hguenther/smtlib2 | examples/Z3Tutorial.hs | gpl-3.0 | 20,220 | 0 | 27 | 5,062 | 9,026 | 4,465 | 4,561 | 532 | 3 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
module Wiretap.Analysis.Lock
( locksetSimulation
, lockset
, lockMap
, nonreentrant
, lockOf
, LockMap
, sharedLocks
)
where
import Wiretap.Data.Event
import Wiretap.Data.History
-- import ... | ucla-pls/wiretap-tools | src/Wiretap/Analysis/Lock.hs | gpl-3.0 | 2,958 | 0 | 14 | 856 | 848 | 456 | 392 | 74 | 4 |
{-# LANGUAGE UnicodeSyntax #-}
-- $ ghc -o 示例 Haskell示例.hs
-- $ ./示例
-- $ ghci --version
-- The Glorious Glasgow Haskell Compilation System, version 8.2.1
-- | 折叠
-- 同理可以有左折叠和从 1 开始的折叠
-- 只是没写,道理都一样
右折叠 :: Foldable 可折叠 => (甲 -> 乙 -> 乙) -> 乙 -> 可折叠 甲 -> 乙
右折叠 = foldr
-- | 乘法
乘 :: Num 数值 => 数值 -> 数值 -> 数值
乘 = (*)
... | program-in-chinese/overview | 示例代码/Haskell示例.hs | gpl-3.0 | 794 | 34 | 7 | 148 | 124 | 84 | 40 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface #-}
module ChibiOSWrap where
import Foreign.Ptr
import Foreign.C.String
import Data.Word
newtype {-# CTYPE "ioportid_t" #-} IoportidT = IoportidT Word32
type SystimeT = Word32
foreign import primitive "const.GPIOD" c_GPIOD :: IoportidT
foreign import primitive "const.GPIOD_LED3"... | metasepi/chibios-arafura | demos/ARMCM4-STM32F407-DISCOVERY_hs/hs_src/ChibiOSWrap.hs | gpl-3.0 | 708 | 2 | 9 | 91 | 144 | 82 | 62 | -1 | -1 |
{-----------------------------------------------------------------
(c) 2008-2009 Markus Dittrich
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License Version 3 as published by the Free Software Foundation.
This program is distribut... | markusle/husky | src/InfoRoutines.hs | gpl-3.0 | 2,823 | 0 | 13 | 938 | 380 | 205 | 175 | 40 | 3 |
{-
Author: Ka Wai Cheng
Maintainer: Ka Wai Cheng
Email: <[email protected]>
License: GPL 3.0
File: ProofChecker.hs
Description: checks given proof tree is correct and shows unsatisfiability
-}
module ProofChecker where
import Proof
import Signature
import ProofUtils
import ... | j5b/ps-pc | ProofChecker.hs | gpl-3.0 | 5,960 | 0 | 15 | 1,501 | 1,652 | 873 | 779 | 104 | 1 |
module EnvTests (runTests) where
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Syntax
import Env
import Test.HUnit
-- printing tests
testEnv1 = initEnv [Static "a", Static "b", Static "c"]
envTest1 = TestCase $ assertEqual... | fredokun/piexplorer | src/EnvTests.hs | gpl-3.0 | 1,197 | 0 | 12 | 274 | 340 | 180 | 160 | 24 | 1 |
module OSRIC.DM where
import EasyIRCBot
import OSRIC.State
setDM :: String -> IRC OSRICState Message
setDM n = do
s <- get
let cs = concrete $ customState s
put $ s { customState = cs { dm = n } }
return $ privmsg $ "Set DM to " ++ n ++"."
tellDM :: IRC OSRICState Message
tellDM = gets (dm.customState) >>= \d... | kaashif/hs-irc-osric | lib/OSRIC/DM.hs | agpl-3.0 | 365 | 0 | 11 | 82 | 149 | 77 | 72 | 11 | 1 |
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func :: (((((((((())))))))))
-- current output is.. funny. wonder if that can/needs to be improved..
| lspitzner/brittany | data/Test364.hs | agpl-3.0 | 215 | 0 | 14 | 26 | 37 | 24 | 13 | 1 | 0 |
module Codewars.Kata.Unique where
import Data.List
findUniqueNumber :: [Int] -> Int
findUniqueNumber [a] = a
findUniqueNumber (a : (b : c))
| a /= b = a
| otherwise = findUniqueNumber c
--
-- | All numbers in the unsorted list are present twice,
-- except the one you have to find.
findUnique :: [Int] -> Int... | ice1000/OI-codes | codewars/101-200/find-the-unique-number.hs | agpl-3.0 | 361 | 0 | 9 | 74 | 104 | 58 | 46 | 9 | 1 |
--Data type way of creating a Person
{-data Person = Person String String Int Float String String deriving (Show)
firstName :: Person -> String
firstName (Person firstname _ _ _ _ _) = firstname
lastName :: Person -> String
lastName (Person _ lastname _ _ _ _) = lastname
age :: Person -> Int
age (Person _ _ age _ _ ... | alexliew/learn_you_a_haskell | code/person.hs | unlicense | 1,157 | 0 | 8 | 331 | 96 | 54 | 42 | 11 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module JavaLight.UseJll where
import JavaLight.JavaletteLight
import Prelude hiding (exp)
{- This Javalette Light program is parsed at compile time,
and replaced by it's abstract syntax representation.
The 'holes' in square brackets are anti-quoted Ha... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/parsing/bnfc-meta-examples/src/JavaLight/UseJll.hs | unlicense | 733 | 0 | 9 | 172 | 125 | 72 | 53 | 12 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QNetworkInterface.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:36
Warning : this file is machine generated ... | keera-studios/hsQt | Qtc/Enums/Network/QNetworkInterface.hs | bsd-2-clause | 4,834 | 0 | 18 | 1,027 | 1,250 | 634 | 616 | 119 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Acid (loadSet, addExperiment) where
import Control.Monad.Reader
import Control.Monad.State
import Data.Acid
import Data.SafeCopy
import Data.Time.LocalTime (ZonedTime(..))
import Data.Typeable
import qualified D... | carlohamalainen/imagetrove-cai-projects-db | Acid.hs | bsd-2-clause | 2,332 | 0 | 11 | 486 | 508 | 258 | 250 | 46 | 1 |
{-# LANGUAGE CPP, FlexibleContexts, GeneralizedNewtypeDeriving, InstanceSigs,
RankNTypes, ScopedTypeVariables, TypeFamilies, UndecidableInstances #-}
module Text.Grampa.ContextFree.Memoizing
{-# DEPRECATED "Use Text.Grampa.ContextFree.SortedMemoizing instead" #-}
(ResultList(..), Parser(..), ... | blamario/grampa | grammatical-parsers/src/Text/Grampa/ContextFree/Memoizing.hs | bsd-2-clause | 18,417 | 0 | 18 | 4,800 | 6,920 | 3,539 | 3,381 | 293 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module ApiTypes where
import Control.Applicative (Applicative)
import Control.Concurrent.STM (TVar)
import Control.Monad.Reader (MonadReader, ReaderT (..))
import Control.Monad.Trans (MonadIO)
import Data.HashMap.Strict (HashMap)
import Data.Set (Set)
import Type.Comment (C... | tinkerthaler/basic-invoice-rest | example-api/ApiTypes.hs | bsd-3-clause | 914 | 0 | 13 | 185 | 260 | 150 | 110 | 24 | 1 |
{-|
Module : MixedTypesNumPrelude
Description : Bottom-up typed numeric expressions
Copyright : (c) Michal Konecny, Pieter Collins
License : BSD3
Maintainer : [email protected]
Stability : experimental
Portability : portable
@MixedTypesNumPrelude@ provides a ver... | michalkonecny/mixed-types-num | src/MixedTypesNumPrelude.hs | bsd-3-clause | 2,375 | 0 | 5 | 338 | 318 | 221 | 97 | 45 | 0 |
module Signal.Wavelet.Eval2Bench where
import Signal.Wavelet.Eval2
{-# INLINE benchDwt #-}
benchDwt :: ([Double], [Double]) -> [Double]
benchDwt (ls, sig) = dwt ls sig
{-# INLINE benchIdwt #-}
benchIdwt :: ([Double], [Double]) -> [Double]
benchIdwt (ls, sig) = idwt ls sig
| jstolarek/lattice-structure-hs | bench/Signal/Wavelet/Eval2Bench.hs | bsd-3-clause | 278 | 0 | 7 | 44 | 101 | 61 | 40 | 8 | 1 |
{-# LANGUAGE MultiParamTypeClasses, NoImplicitPrelude, RebindableSyntax #-}
{-# LANGUAGE ScopedTypeVariables, ViewPatterns #-}
module Numeric.Field.Fraction
( Fraction
, numerator
, denominator
, Ratio
, (%)
, lcm
) where
import Data.Proxy
import Numeric.Additive.Class
import Nume... | athanclark/algebra | src/Numeric/Field/Fraction.hs | bsd-3-clause | 4,275 | 0 | 14 | 1,015 | 1,628 | 830 | 798 | 108 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Language.Typo.Token
( typoDef -- :: LanguageDef s
, typo -- :: GenTokenParser String u Identity
, lexeme -- :: Parsec String u a -> Parsec String u a
, parens -- :: Parsec String u a -> Parsec String u a
, identifier -- :: Parsec String u String
... | seliopou/typo | Language/Typo/Token.hs | bsd-3-clause | 1,630 | 0 | 8 | 372 | 357 | 214 | 143 | 39 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClas... | emwap/feldspar-language | src/Feldspar/Core/Constructs/MutableToPure.hs | bsd-3-clause | 4,777 | 0 | 14 | 996 | 904 | 479 | 425 | 69 | 1 |
{-
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0
Kubernetes API version: v1.9.12
Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
-}
{-|
Module : Kubernetes.OpenAPI.API.Certifi... | denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/API/Certificates.hs | bsd-3-clause | 2,742 | 0 | 8 | 331 | 484 | 333 | 151 | -1 | -1 |
module Network.PushbulletSpec (main, spec) where
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "someFunction" $ do
it "should work fine" $ do
True `shouldBe` False
| KevinCotrone/pushbullet | test/Network/PushbulletSpec.hs | bsd-3-clause | 215 | 0 | 13 | 49 | 76 | 40 | 36 | 9 | 1 |
import System.Environment (getArgs)
import Data.List.Split (splitOn)
maxran :: Int -> Int -> [Int] -> [Int] -> Int
maxran x _ _ [] = x
maxran x c (y:ys) (z:zs) = maxran (max x d) d (ys ++ [z]) zs
where d = c - y + z
maxrange :: [String] -> Int
maxrange [ns, x... | nikai3d/ce-challenges | easy/max_range_sum.hs | bsd-3-clause | 673 | 0 | 12 | 279 | 300 | 155 | 145 | 17 | 1 |
import System.Environment (getArgs)
r1 :: [Int]
r1 = [1, 0, 0, 0, 1, 1]
r2 :: [Int]
r2 = [1, 0, 1, 0, 1, 1]
bnot :: Int -> Int
bnot 0 = 1
bnot _ = 0
pmod6 :: Int -> Int
pmod6 x | mod x 6 == 0 = 6
| otherwise = mod x 6
locks :: [Int] -> Int
locks [0, _] = 0
locks [x, 0] = x
locks [x, 1] = x-1
locks [x, y... | nikai3d/ce-challenges | moderate/locks.hs | bsd-3-clause | 816 | 0 | 13 | 320 | 469 | 239 | 230 | 26 | 1 |
module Main where
import Graphics.Gnuplot.Simple
-- import qualified Graphics.Gnuplot.Terminal.WXT as WXT
-- import qualified Graphics.Gnuplot.Terminal.PostScript as PS
ops :: [Attribute]
-- ops = [(Custom "term" ["postscript", "eps", "enhanced", "color", "solid"])
-- ,(Custom "output" ["temp.eps"])
-- ]... | chupaaaaaaan/nn-with-haskell | app/Main_ex.hs | bsd-3-clause | 569 | 0 | 13 | 116 | 115 | 66 | 49 | 10 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.